I've got three images saved in my project, 1.jpg
2.jpg
and 3.jpg
and a picture box that currently displays nothing. I also have three radio buttons. What I'm trying to do is when I click radio button one, the picture box displays 1.jpg
, when I click radio button 2, 2.jpg
displays and so on.
I'm trying to get some code that looks something like this ..
private void imageOne_CheckedChanged(object sender, EventArgs e)
{
imageContainer.Image = "1.jgp";
}
But I get an error saying I can't convert a string to a System.Drawing.Image
What is the correct way of approaching this?