G
G
god6662018-07-12 11:46:37
C++ / C#
god666, 2018-07-12 11:46:37

How is string.Empty different from String.Empty?

How is string.Empty different from String.Empty?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Peter, 2018-07-12
@god666

string is an alias for System.String. You can compare with int and System.Int32. Therefore, there is no difference. Is that the highlight of the word is different. String will highlight as a class.

S
Stanislav Makarov, 2018-07-12
@Nipheris

Let's reduce the question to "How is string different from String?"
https://docs.microsoft.com/en-us/dotnet/csharp/lan...
string is a keyword for a standard data type defined in the language standard, String (aka System.String) is a class provided by CTS . In C# code, these are the same, but it's better to use string.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question