What is the difference between these two declarations?
string str;
String str;
In normal usage, string and String are identical; string is simply an alias for global::System.String. There are some edge-cases, though:
using System; to use String - you don't for stringclass String {}, then String refers to that (this would be a silly thing to do, of course). You can't define a class called string (although @string is fine)There is no difference. string (lower case) is just an alias for System.String.
string is always an alias for System.String, whereas String just follows the normal type lookup rules. If, for example, you have another class called String in the current scope, String will refer to that, and not to System.String.They are the same, no difference, string is simply an alias for the System.String type, there are other similar cases in C#, like int and System.Int32, long and System.Int64 (see another related question)
Curiously though, whilst you can use alias in your code in place of the fully qualified types, you still need to know the underlying type when you use the Convert class because there's no ToInt or ToLong methods but only ToInt32 and ToInt64..
Convert is a framework class, not a language keyword. If it had methods named after the C# keywords, the methods would make no sense in VB or F# or other .NET languages.