String.IsNullOrEmpty or string.IsNullOrEmpty
String stands for System.String and it is a .NET Framework type. string is an alias in the C# language for System.String. Both of them are compiled to System.String in IL (Intermediate Language), so there is no difference. Choose what you like and use that. If you code in C#, I'd prefer string as it's a C# type alias and well-know by C# programmers.
I can say the same about (int, System.Int32) etc..
They are the same.
Personally, I prefer to use String.IsNullOrEmpty
. The alternative just doesn't look right. The same goes for choosing Int32.Parse(...)
over int.Parse(...)
. And, of course, no matter what approach you choose, be consistent.
They are both the same.
string is a keyword alias in c# for System.String.
Only difference is that when using String, you need to use either System.String.IsNullOrEmpty
or using System;
at the begining of your code file.