Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
AnswerRe: Bitmap to Pointer ? Pin
Jared Parsons10-Dec-05 18:54
Jared Parsons10-Dec-05 18:54 
GeneralRe: Bitmap to Pointer ? Pin
ger_creal11-Dec-05 2:22
ger_creal11-Dec-05 2:22 
AnswerRe: Bitmap to Pointer ? Pin
Ista11-Dec-05 14:28
Ista11-Dec-05 14:28 
GeneralRe: Bitmap to Pointer ? Pin
Jared Parsons12-Dec-05 4:56
Jared Parsons12-Dec-05 4:56 
QuestionNeed Help Pin
cmrotruck10-Dec-05 9:48
cmrotruck10-Dec-05 9:48 
AnswerRe: Need Help Pin
Colin Angus Mackay10-Dec-05 13:35
Colin Angus Mackay10-Dec-05 13:35 
AnswerRe: Need Help Pin
Ista11-Dec-05 11:29
Ista11-Dec-05 11:29 
QuestionA Class like TreeNode Pin
Bahadir Cambel10-Dec-05 9:31
Bahadir Cambel10-Dec-05 9:31 
How could I design a class like TreeNode, I have tried but I am getting a Object Reference Exception

public class classA<br />
{<br />
public classA(){}<br />
public void INeed()<br />
{<br />
classB b = new classB();<br />
b.Add(string something);<br />
}<br />
}<br />
public class classB<br />
{<br />
private string att1;<br />
private int index ;<br />
private classB[] container;<br />
public classB()<br />
{<br />
container = new classB[100];index = 0 ;<br />
}<br />
public void Add(string addNew)<br />
{<br />
container[index].att1 = addNew;//causes error<br />
index++;<br />
}<br />
}


If I do so , am getting a Object reference not set to an instance of an object error
in the line that I try to add something to the container.
Could you explain why ?
And how could I deal with the issue ?

-- modified at 15:24 Saturday 10th December, 2005
AnswerRe: A Class like TreeNode Pin
Sean Michael Murphy10-Dec-05 10:05
Sean Michael Murphy10-Dec-05 10:05 
GeneralRe: A Class like TreeNode Pin
Bahadir Cambel10-Dec-05 10:20
Bahadir Cambel10-Dec-05 10:20 
GeneralRe: A Class like TreeNode Pin
Ista11-Dec-05 14:31
Ista11-Dec-05 14:31 
QuestionHow to make a report in c# Pin
ngt10-Dec-05 5:35
ngt10-Dec-05 5:35 
AnswerRe: How to make a report in c# Pin
Ista11-Dec-05 11:30
Ista11-Dec-05 11:30 
QuestionFor image processing experts Pin
haytham_mohammad10-Dec-05 3:06
haytham_mohammad10-Dec-05 3:06 
AnswerRe: For image processing experts Pin
rob tillaart10-Dec-05 5:08
rob tillaart10-Dec-05 5:08 
GeneralRe: For image processing experts Pin
haytham_mohammad10-Dec-05 6:33
haytham_mohammad10-Dec-05 6:33 
GeneralRe: For image processing experts Pin
Stanciu Vlad10-Dec-05 8:09
Stanciu Vlad10-Dec-05 8:09 
GeneralRe: For image processing experts Pin
rob tillaart11-Dec-05 1:20
rob tillaart11-Dec-05 1:20 
AnswerRe: For image processing experts Pin
Ista11-Dec-05 14:33
Ista11-Dec-05 14:33 
GeneralRe: For image processing experts Pin
haytham_mohammad12-Dec-05 3:18
haytham_mohammad12-Dec-05 3:18 
GeneralRe: For image processing experts Pin
Ista12-Dec-05 3:22
Ista12-Dec-05 3:22 
GeneralRe: For image processing experts Pin
haytham_mohammad12-Dec-05 18:42
haytham_mohammad12-Dec-05 18:42 
GeneralRe: For image processing experts Pin
Ista13-Dec-05 2:28
Ista13-Dec-05 2:28 
Questionrequest:source code Pin
sachappi10-Dec-05 2:30
sachappi10-Dec-05 2:30 
AnswerRe: request:source code Pin
Colin Angus Mackay10-Dec-05 7:22
Colin Angus Mackay10-Dec-05 7:22 

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.