java - Why can these integers 1,100 be used directly in C#?
仅有的幸福
仅有的幸福 2017-05-18 10:44:41
0
1
644

I suddenly thought today, are the integers 1, 2, 3, and 100 defined in C#? Why can they be used directly?

for example,

100.ToString()

var temp = 1000

But when I look at the definition of Int32 in C#, I just write a minimum value and a maximum value,

Still don’t quite understand.

Is it encoding?

C# Int32 source code

仅有的幸福
仅有的幸福

reply all(1)
滿天的星座

The minimum and maximum values ​​are const, which are so-called static variables.
ToString() is a member function.
1, 2, 3, and 100 are all instances of Int32. Of course,
instances can access the member function.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template