I'm getting an error in the below statement SPECIFICALLY at keySet with the error "the name 'keySet' does not exist in the current context"
foreach (var iteration in keySet)
{
}
break;
I'm storing the keySet inside of another public function, I'm not sure how to get the information out of that function and into this foreach statement. Heres an example of the other the other function
public void Form1_Load(object sender, EventArgs e)
{
List<keyRing> keySet = new List<keyRing>(); //creating the list of key rings
//creating ALL key rings manually entering information
keySet.Add(new keyRing
{
keyRingIdentifier = "L1.6",
numberOfKeys = 2,
KeyLocation = "storage Building",
keyIdentifier = new[] { "146.23", "72.32" },
keyDescription = new[] { "locker room", "control room" },
});