I create a class "Drink"
Drink have two variable
one is drink name, another is drink's picture
public class Drink
{
public string name {get; set; }
public Image pic {get; set; }
}
and initial it.
List<Drink> ex = new List<Drink>
{
new Drink { name = "juice", pic = "Assets/juice.png" },
new Drink { name = "water", pic = "Assets/water.png" }
};
but the pic's path is wrong, how set the picture to each?
Update: error message