Need some help with creating a class

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
28,050
Reaction score
17,804
Hey guys. So basically I just have a class with various properties and one of those I need to be able to add 1 or multiple items to that property when instantiating the class. I want this property to be a list or array string.

For eg:

var person = new Employee();
person.Address.Add = "1 sunset road, Hollywood";
person.Address.Add = "24 Field Street, London";
person.Address.Add = "43 Running out of address ideas";

My question is, how would I represent this list/array 'Address' property inside the class? It seems simple but my brain is not complying today. TIA!
 
 
Top
Sign up to the MyBroadband newsletter
X