开发者

In C#. What is the differences between String and string? [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

In C# what is the difference between String and string

In C# there are two string types. (The same for booleans, object, ect.). One that begins with upperc开发者_JAVA百科ase and one lowercase. String and string. They seem to have the same methods.

So whats is the difference between them?


string is a keyword, while System.String is a class. You can consider string to be an alias for System.String.


There is one difference... you can't use String without using System; beforehand.

What is the difference between String and string in C#?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜