G
Guest
I want to write a class that has multiple values associate to it
public class Person {
public string FirstName {get; set;}
public string LastName {get; set;}
public DateTime Date {get; set;}
}
For example, I want to create an object like this:
Person p = new Person();
p.FirstName = "John Smith";
p.FirstName.Description = "First Name Text";
p.FirstName.IsUsed = true;
How do I write it? do I need to write a wrapper class for "string" and
"DateTime"?
public class Person {
public string FirstName {get; set;}
public string LastName {get; set;}
public DateTime Date {get; set;}
}
For example, I want to create an object like this:
Person p = new Person();
p.FirstName = "John Smith";
p.FirstName.Description = "First Name Text";
p.FirstName.IsUsed = true;
How do I write it? do I need to write a wrapper class for "string" and
"DateTime"?