Is there a way to list all Variables (Fields) of a class in C#. If yes than could someone give me some examples how to save them in a List and get them maybe us
List
var fields = whateverYourClassType.GetType().GetFields().Select(f => f.Name).ToList();