Click here to Skip to main content
16,005,473 members
Home / Discussions / C#
   

C#

 
QuestionThreading Pin
1nsp1r3d25-Nov-05 2:26
1nsp1r3d25-Nov-05 2:26 
AnswerRe: Threading Pin
Curtis Schlak.25-Nov-05 4:44
Curtis Schlak.25-Nov-05 4:44 
QuestionArray Index Problem Pin
ytubis25-Nov-05 1:45
ytubis25-Nov-05 1:45 
AnswerRe: Array Index Problem Pin
the last free name25-Nov-05 2:16
the last free name25-Nov-05 2:16 
GeneralRe: Array Index Problem Pin
ytubis25-Nov-05 2:25
ytubis25-Nov-05 2:25 
GeneralRe: Array Index Problem Pin
Curtis Schlak.25-Nov-05 2:50
Curtis Schlak.25-Nov-05 2:50 
GeneralRe: Array Index Problem Pin
ytubis25-Nov-05 3:02
ytubis25-Nov-05 3:02 
GeneralRe: Array Index Problem Pin
Curtis Schlak.25-Nov-05 4:13
Curtis Schlak.25-Nov-05 4:13 
Okay, I don't know the specific class Matrix to which you have referred. However, let's assume that you have a Matrix class that acts like an n x m array of objects. Then, you could have the following code:
Matrix m = new Matrix( n, m );
for( int i = 0; i < n; i++ )
{
  for( int j = 0; j < m; j++ )
  {
    m[ i, j ] = new Button();
    m[ i, j ].Tag = new int[] { i, j };
  }
}

And you could then acess the button in your event handler like so:
Button b = ( Button ) sender;
int[] index = ( int[] ) b.Tag;

That would then contain your index where the row index is in the first entry of index and the column entry in the second.

"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
Questionhow to check infinite condition in C# Pin
satish090925-Nov-05 1:12
satish090925-Nov-05 1:12 
AnswerRe: how to check infinite condition in C# Pin
J4amieC25-Nov-05 1:37
J4amieC25-Nov-05 1:37 
AnswerRe: how to check infinite condition in C# Pin
Robert Rohde25-Nov-05 7:01
Robert Rohde25-Nov-05 7:01 
Questionlocalization Pin
brain2cpu25-Nov-05 0:33
professionalbrain2cpu25-Nov-05 0:33 
AnswerRe: localization Pin
lmoelleb25-Nov-05 1:33
lmoelleb25-Nov-05 1:33 
QuestionPoint of Service Pin
raheeli25-Nov-05 0:05
raheeli25-Nov-05 0:05 
AnswerRe: Point of Service Pin
Robert Rohde25-Nov-05 7:06
Robert Rohde25-Nov-05 7:06 
Questionquestion Pin
eyalso24-Nov-05 23:38
eyalso24-Nov-05 23:38 
AnswerRe: question Pin
ajay_dalvi1325-Nov-05 0:09
ajay_dalvi1325-Nov-05 0:09 
GeneralRe: question Pin
eyalso25-Nov-05 0:44
eyalso25-Nov-05 0:44 
QuestionOnSessionEnd Eventhandler in C#. Pin
ajay_dalvi1324-Nov-05 23:36
ajay_dalvi1324-Nov-05 23:36 
QuestionComboBox problem Pin
A.Grover24-Nov-05 23:30
A.Grover24-Nov-05 23:30 
AnswerRe: ComboBox problem Pin
Robert Rohde25-Nov-05 7:08
Robert Rohde25-Nov-05 7:08 
QuestionHow can i merge rows with data grid for my following requirement Pin
raghav_tpg24-Nov-05 19:55
raghav_tpg24-Nov-05 19:55 
AnswerRe: How can i merge rows with data grid for my following requirement Pin
manasvarpe24-Nov-05 20:49
manasvarpe24-Nov-05 20:49 
GeneralRe: How can i merge rows with data grid for my following requirement Pin
J4amieC24-Nov-05 21:31
J4amieC24-Nov-05 21:31 
GeneralRe: How can i merge rows with data grid for my following requirement Pin
manasvarpe27-Nov-05 17:24
manasvarpe27-Nov-05 17:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.