As pointed out, they are the same thing and string
is just an alias to String
.
For what it's worth, I use string to declare types - variables, properties, return values and parameters. This is consistent with the use of other system types - int, bool, var
etc (although Int32
and Boolean
are also correct).
I use String
when using the static methods on the String class, like String.Split()
or String.IsNullOrEmpty()
. I feel that this makes more sense because the methods belong to a class, and it is consistent with how I use other static methods.