Hi,
I am new to C#, and writing a sudoku solver as a WPF application. I've declared the windows contents as 81 textboxes in a series of grids, a label and a button. A click to the "solve" button triggers an event handler that I want to iterate over the given textboxes, and load their Text attribute into a 2d array of 2d arrays. For this I need to be able to enumerate the textboxes declared in the XAML.
I can access one textbox easily enough in the C#, but how do I get all 81 of them? If I were using a higher level language, I would use eval() with a constant string and a counter, but I gather C# being compiled has no eval.
Any help would be appreciated on this please.
Thanks!
I am new to C#, and writing a sudoku solver as a WPF application. I've declared the windows contents as 81 textboxes in a series of grids, a label and a button. A click to the "solve" button triggers an event handler that I want to iterate over the given textboxes, and load their Text attribute into a 2d array of 2d arrays. For this I need to be able to enumerate the textboxes declared in the XAML.
I can access one textbox easily enough in the C#, but how do I get all 81 of them? If I were using a higher level language, I would use eval() with a constant string and a counter, but I gather C# being compiled has no eval.
Any help would be appreciated on this please.
Thanks!
Comment