Click here to Skip to main content
15,912,205 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to catch a exception from another class? Pin
#realJSOP30-Dec-08 6:58
professional#realJSOP30-Dec-08 6:58 
AnswerRe: How to catch a exception from another class? Pin
Daniel Grunwald30-Dec-08 8:51
Daniel Grunwald30-Dec-08 8:51 
QuestionEvent registration Pin
karoitay30-Dec-08 2:59
karoitay30-Dec-08 2:59 
AnswerRe: Event registration Pin
N a v a n e e t h30-Dec-08 3:31
N a v a n e e t h30-Dec-08 3:31 
GeneralThanks Pin
karoitay30-Dec-08 4:17
karoitay30-Dec-08 4:17 
QuestionExcel Tables Pin
twsted f830-Dec-08 2:58
twsted f830-Dec-08 2:58 
AnswerRe: Excel Tables Pin
EricGoodchild30-Dec-08 15:07
EricGoodchild30-Dec-08 15:07 
QuestionObject reference not set to an instance of an object? Pin
dec8230-Dec-08 1:53
dec8230-Dec-08 1:53 
i have a class

public class Command
{
public int Number;
public int[] Types= new int[30] ;
}

then i try to assign value of each by reading from a xml file

Command[] Querr = new Command[200];
XmlDocument Reader = new XmlDocument();
Reader.Load("MyXml.xml");

XmlNodeList List = Reader.SelectNodes("/MyXml/Common");

foreach (XmlNode node in List)
{
int i = int.Parse(node.Attributes["value"].InnerText);
Querr[i].Number = i;
}
I have error when Querr[i].Number=i, and it said" Object reference not set to an instance of an object"
How do i solve it? Thanks
AnswerRe: Object reference not set to an instance of an object? [modified] Pin
Xmen Real 30-Dec-08 1:59
professional Xmen Real 30-Dec-08 1:59 
GeneralRe: Object reference not set to an instance of an object? Pin
dec8230-Dec-08 2:11
dec8230-Dec-08 2:11 
GeneralRe: Object reference not set to an instance of an object? Pin
Xmen Real 30-Dec-08 2:20
professional Xmen Real 30-Dec-08 2:20 
GeneralRe: Object reference not set to an instance of an object? Pin
dec8230-Dec-08 2:36
dec8230-Dec-08 2:36 
GeneralRe: Object reference not set to an instance of an object? Pin
Xmen Real 30-Dec-08 2:40
professional Xmen Real 30-Dec-08 2:40 
AnswerRe: Object reference not set to an instance of an object? Pin
Member 428013630-Dec-08 2:03
Member 428013630-Dec-08 2:03 
AnswerRe: Object reference not set to an instance of an object? Pin
Brij30-Dec-08 2:04
mentorBrij30-Dec-08 2:04 
AnswerRe: Object reference not set to an instance of an object? Pin
Member 428013630-Dec-08 2:09
Member 428013630-Dec-08 2:09 
Questionhow can i import another projects/language .exe file into my project to run in C# Pin
D V kirankumar30-Dec-08 1:48
D V kirankumar30-Dec-08 1:48 
AnswerRe: how can i import another projects/language .exe file into my project to run in C# Pin
Christian Graus30-Dec-08 4:26
protectorChristian Graus30-Dec-08 4:26 
GeneralRe: how can i import another projects/language .exe file into my project to run in C# Pin
D V kirankumar30-Dec-08 23:00
D V kirankumar30-Dec-08 23:00 
QuestionSubclassing Help Pin
JimWWhite30-Dec-08 1:22
JimWWhite30-Dec-08 1:22 
AnswerRe: Subclassing Help Pin
Brij30-Dec-08 2:14
mentorBrij30-Dec-08 2:14 
GeneralRe: Subclassing Help Pin
JimWWhite31-Dec-08 1:24
JimWWhite31-Dec-08 1:24 
QuestionThread marshalling problem Pin
Member 428013630-Dec-08 0:47
Member 428013630-Dec-08 0:47 
AnswerRe: Thread marshalling problem Pin
Natza Mitzi30-Dec-08 4:33
Natza Mitzi30-Dec-08 4:33 
GeneralRe: Thread marshalling problem Pin
Member 428013630-Dec-08 5:14
Member 428013630-Dec-08 5:14 

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.