private void boardToView() { Board theBoard = board; // in the loop, don't get the board each time from the game foreach (Square square in Squares.All) { string text = SquareContentMapper.ToText(theBoard[square]); this[square].SetTitle(text, UIControlState.Normal); } }
private void boardToView() { Board theBoard = board; // in the loop, don't get the board each time from the game foreach (Square square in Squares.All) { string text = SquareContentMapper.ToText(theBoard[square]); #if DotNet11 // .NET 1.1 trick to get around this error message: // Property or indexer 'property' cannot be assigned to — it is read only Button button = this[square]; button.Text = Text; #else this[square].Content = text; #endif } ; }