Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public enum FirstEnum
  2. {
  3. FirstValue,
  4. SecondValue
  5. }
  6.  
  7. public enum SecondEnum
  8. {
  9. FirstValue,
  10. SecondValue
  11. }
  12.  
  13. public FirstEnum[] first = new FirstEnum[]{ FirstEnum.FirstValue,
  14. FirstEnum.FirstValue,
  15. FirstEnum.SecondValue };
  16.  
  17. public SecondEnum[] second = new SecondEnum[]{SecondEnum.FirstValue,
  18. SecondEnum.SecondValue,
  19. SecondEnum.SecondValue }
  20.  
  21. public void WorkWithEnums(Enum[] myEnumValues)
  22. {
  23. // ....
  24. }
  25.  
  26. WorkWithEnums(first);
  27. WorkWithEnums(second);
  28.  
  29. WorkWithEnums(first.Cast<Enum>().ToArray())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement