I have a person class as below, with an image as an attribute. I'm trying to figure out how to create an instance of the person class in my program class, and set the image of the object to a filepath, e.g. C:\Users\Documents\picture.jpg. How would I go about this?
public class Person
{
public string firstName { get; set; }
public string lastName { get; set; }
public Image myImage { get; set; }
public Person()
{
}
public Person(string firstName, string lastName, Image image)
{
this.fName = firstName;
this.lName = lastName;
this.myImage = image;
}
}