Can you pass as a standard c # enum parameter?
For example:
enum e1 {//}} enum e2 {//}} public zero testing () {myFunc (e1); MyFunk (E2); } Public Zero myFunc (Enum E) {// Through all the values}} By doing so I hope to retrieve all the names within any enum. What does the Iteration code look like?
this!
Public Zero Foo (Enum E) {var name = Enum.GetNames (e.GetType ()); Foreach (name name) {// do something! }}
Edit: My bad, you did say iterative .
Note: I know that I just call GetNames () in my undone statement, but I like to call that type of method first because it is easy for debugging .
Comments
Post a Comment