-
Notifications
You must be signed in to change notification settings - Fork 29
/
CSharpTypeKeyword.cs
44 lines (44 loc) · 1.35 KB
/
CSharpTypeKeyword.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace PublicApiGenerator
{
internal static class CSharpTypeKeyword
{
public static string Get(string typeName)
{
switch (typeName)
{
case "System.Byte":
return "byte";
case "System.SByte":
return "sbyte";
case "System.Int16":
return "short";
case "System.UInt16":
return "ushort";
case "System.Int32":
return "int";
case "System.UInt32":
return "uint";
case "System.Int64":
return "long";
case "System.UInt64":
return "ulong";
case "System.Single":
return "float";
case "System.Double":
return "double";
case "System.Decimal":
return "decimal";
case "System.Object":
return "object";
case "System.String":
return "string";
case "System.Boolean":
return "bool";
case "System.Void":
return "void";
default:
return typeName;
}
}
}
}