C # type name instead of CLR type name
3 answers
Yes, you could write a mapping function. It's just an alias anyway.
Here's a list:
http://msdn.microsoft.com/en-us/library/86792hfa(VS.71).aspx
+4
source to share
Using reflection, you can use CSharpCodeProvider
(exists in .NET Core 2 as well) to get "int", "string", etc. instead of fully qualified CLR type names.
There are other SO posts that provide code examples for this:
How can I get the primitive name of a type in C #?
C # - get convenient name of simple types by reflection?
Alternatively, you will have to match these types yourself. There are several libraries for this, if you don't mind third party libraries. Don't forget about zero value changes.
0
source to share