C# Get Enum Members

/ Published in: C#
Save to your folder(s)

Retrieves an array of strings corresponding to members of the given enum. Useful for looping through them at runtime.

Copy this code and paste it in your HTML
  1. string[] names = Enum.GetNames(typeof(MyEnumName));

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.