Last active
December 20, 2018 00:51
-
-
Save controlflow/95828e927e184e933a3b07823fa60862 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NotNull, Pure] | |
public static string Present(this TypeKind kind) { | |
switch (kind) { | |
case TypeKind.StaticClass: return "S"; | |
case TypeKind.AbstractClass: return "A"; | |
case TypeKind.Interface: return "I"; | |
case TypeKind.Enumeration: return "E"; | |
case TypeKind.ValueType: return "V"; | |
default: return "C"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NotNull, Pure] | |
public static string Present(this TypeKind kind) { | |
return kind switch { | |
TypeKind.StaticClass => "S", | |
TypeKind.AbstractClass => "A", | |
TypeKind.Interface => "I", | |
TypeKind.Enumeration => "E", | |
TypeKind.ValueType => "V", | |
_ => "C" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment