I have a human class, as shown below, with the 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 the file path, for example. C: \ Users \ Documents \ Picture.jpg. How can i do 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; } }
source share