C# -Data Type Conversion Beginners Tutorial

preview_player
Показать описание
Lets learn about data type conversion in C# using Visual Studio 2019.

The GausRoth Tutorials channel is dedicated to teaching beginners the ins and outs of programming with C# and Unity. If you are a beginner don't forget to like the video, subscribe and click the bell icon.

Рекомендации по теме
Комментарии
Автор

In this video you stated - twice - that "float is larger than int" (at 0:53 and 1:34), when this is not true. Both occupy exactly 4 bytes - neither is larger.
The reason an explicit conversion is required from float -> int is because it's a narrowing conversion due to the loss of a fractional component.
It's not the range of data that is restricted, it's the precision.

And if anything float has worse capability to hold values:



int.MaxValue is 2147483647, yet this outputs 2.1474836E+09 - which is losing 2 significant digits.

YasahiroD
Автор

You made a very good video, A+. Just one little suggestion: Make the font in the console window bigger in future demos, please.

WayneGreen-gl
visit shbcf.ru