Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
3.ToString() 调用哪个方法?
C# 中的所有整数文字默认为int( Int32),除非它们对于 来说太大int,在这种情况下,它们会成为适合的更大数据类型,例如long( Int64)。
int
Int32
long
Int64
所以在这种情况下,Int32.ToString()被称为。
Int32.ToString()
System.Int32.ToString()因为文字整数是 Int32 类型
System.Int32.ToString()