Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum Enum1{
- Yes,
- No
- }
- public static class EnumExtension
- {
- public static string Translate(this Enum1 arg)
- {
- switch (arg)
- {
- case Enum1.Yes:
- {
- return "Tak";
- }
- case Enum1.No:
- {
- return "Nie";
- }
- default:
- throw new NotImplementedException();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement