I would do it like this:
class Thing {
public string name;
public string a; // This may also be a List<string> for dynamic Add/Remove
public string b;
// ...
public Thing(string Name, string A, string B) {
name = Name; a = A; b = B;
}
}
Usage:
List<Thing> things = new List<Thing>();
things.Add(new Thing("Fence", "A1", "A2"));
things.Add(new Thing("Door", "A1", "A2"));
// ...
I always use a class to store a bunch of information that belongs together. The best example for this are the derivations of EventArgs
, like the PaintEventArgs
. All needed information comes with one instance.
This enables you also to implement more features. For example, I amost always override the ToString()
method of that class, so I am able to display the objects contents while debugging or simply adding the objects to a ListBox
or a ComboBox
, because they call ToString()
to display.