I have a List in which I have stored name of few buttons. I have used this to create List.`
List<String> seat = new List<String>(); //List name "seat".
for (int a = 0; a < dt.Rows.Count; a++)
seat.Add(dt.Rows[a]["SeatNo"].ToString()); //Adding values to seat from a column of table.("SeatNo" column has button names).
What I want is that all the buttons in form whose Name is same as those Names containing in the List, to get disabled.
I thought of traversing the List and disabling the buttons whose name matches with name in the List but I cannot get the logic for that.
I am a beginner in C#, Please explain it in simple terms. Thank you in advance.