Does anybody know how I can write "cardImage1.BorderStyle = BorderStyle.Fixed3D;" without having to explicitly declare "cardImage1"?
I'm trying to put it into a method so that I don't need to write the code to toggle between two Border Styles when a Picture Box is clicked, for every single single picture box (there are 52!)
e.g. for each box currently I would need to have the following in its _click event.
if (cardImage1.BorderStyle == BorderStyle.None)
{
cardImage1.BorderStyle = BorderStyle.Fixed3D;
}
else
{
cardImage1.BorderStyle = BorderStyle.None;
}