Click here to Skip to main content
15,907,687 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to make print preview maximized? Pin
Tom Larsen30-Jan-04 11:31
Tom Larsen30-Jan-04 11:31 
GeneralMaximum value of an array Pin
crushinghellhammer30-Jan-04 9:37
crushinghellhammer30-Jan-04 9:37 
GeneralRe: Maximum value of an array Pin
Heath Stewart30-Jan-04 10:05
protectorHeath Stewart30-Jan-04 10:05 
GeneralRe: Maximum value of an array Pin
crushinghellhammer30-Jan-04 11:19
crushinghellhammer30-Jan-04 11:19 
GeneralRe: Maximum value of an array Pin
Heath Stewart30-Jan-04 11:36
protectorHeath Stewart30-Jan-04 11:36 
GeneralRe: Maximum value of an array Pin
crushinghellhammer30-Jan-04 11:59
crushinghellhammer30-Jan-04 11:59 
GeneralRe: Maximum value of an array Pin
Heath Stewart30-Jan-04 12:03
protectorHeath Stewart30-Jan-04 12:03 
Generalconsuming a class defined in another assembly Pin
godzooky30-Jan-04 8:56
godzooky30-Jan-04 8:56 
GeneralRe: consuming a class defined in another assembly Pin
Heath Stewart30-Jan-04 10:13
protectorHeath Stewart30-Jan-04 10:13 
GeneralRe: consuming a class defined in another assembly Pin
godzooky30-Jan-04 10:39
godzooky30-Jan-04 10:39 
GeneralRe: consuming a class defined in another assembly Pin
Heath Stewart30-Jan-04 10:46
protectorHeath Stewart30-Jan-04 10:46 
GeneralRe: consuming a class defined in another assembly Pin
Nick Parker30-Jan-04 11:19
protectorNick Parker30-Jan-04 11:19 
GeneralRe: consuming a class defined in another assembly Pin
godzooky30-Jan-04 15:41
godzooky30-Jan-04 15:41 
GeneralWindows Services using C# Pin
Todd J Christensen30-Jan-04 8:19
sussTodd J Christensen30-Jan-04 8:19 
GeneralRe: Windows Services using C# Pin
David R. Tosi30-Jan-04 8:52
David R. Tosi30-Jan-04 8:52 
GeneralRe: Windows Services using C# Pin
Member 64105530-Jan-04 11:29
Member 64105530-Jan-04 11:29 
GeneralComponents: Design-Time support for properties Pin
UB30-Jan-04 6:51
UB30-Jan-04 6:51 
GeneralRe: Components: Design-Time support for properties Pin
Heath Stewart30-Jan-04 9:57
protectorHeath Stewart30-Jan-04 9:57 
GeneralRe: Components: Design-Time support for properties Pin
UB1-Feb-04 6:13
UB1-Feb-04 6:13 
GeneralC# controls in W2K... Pin
EyeOfTheSky30-Jan-04 5:58
EyeOfTheSky30-Jan-04 5:58 
GeneralRe: C# controls in W2K... Pin
Tom Larsen30-Jan-04 6:25
Tom Larsen30-Jan-04 6:25 
GeneralRe: C# controls in W2K... Pin
EyeOfTheSky30-Jan-04 7:17
EyeOfTheSky30-Jan-04 7:17 
GeneralRe: C# controls in W2K... Pin
Heath Stewart30-Jan-04 9:53
protectorHeath Stewart30-Jan-04 9:53 
GeneralRe: C# controls in W2K... Pin
Nick Parker30-Jan-04 11:09
protectorNick Parker30-Jan-04 11:09 
General2D Arrays, something strange Pin
bouli30-Jan-04 5:36
bouli30-Jan-04 5:36 
Hi there,
I'm a newbie in C# and comming from C++/MFC.

I'm building my first application in C#.

I have created a class derived from Object

public class Block : Object
{
Block()
{ Initialize(); }

public bool Initialize()
{ Debug.WriteLine("Block.Initialize"); ... }
...
}

As the array is a 2D array of Block, I have instanciated the arry like that:
Block[,] board=new Block[m_nHeight, m_nWidth];
while default values for m_nHeight is 20 and m_nWidth is 10.

When I look at the trace, I see only 0 calls for the method Block.Initialize. Confused | :confused:
How can it be possible? Are all the Block object created when I do "m_board=new Block[m_nHeight, m_nWidth];"??? or must I browse the array and call m_board[i, j]=new Block()? If all blocks are created, I should get 200 lines of "Block.Initialize"...

Can anybody explain what's wrong?

Best regards.

Thanks.

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.