In C #, string is just an alias for System.String , so both are the same, and typeof returns an object of the same type.
The same applies to all other primitive types. For example, int is just an alias for System.Int32 .
If you need to get a shorter C # alias name of type, you can use CSharpCodeProvider.GetTypeOutput() instead of FullName :
using Microsoft.CSharp; [...] var compiler = new CSharpCodeProvider(); var type = new CodeTypeReference(typeof(Int32)); Console.WriteLine(compiler.GetTypeOutput(type));
(code snippet taken from this question )
source share