Click here to Skip to main content
15,918,808 members
Home / Discussions / C#
   

C#

 
AnswerRe: Are there dynamic array librarys available in C#? Pin
Norman-Timo25-Aug-04 3:21
Norman-Timo25-Aug-04 3:21 
GeneralDrawing Pin
Member 1697724-Aug-04 18:29
Member 1697724-Aug-04 18:29 
GeneralRe: Drawing Pin
sreejith ss nair24-Aug-04 18:56
sreejith ss nair24-Aug-04 18:56 
QuestionFirst time using Windows Forms -- Components not appearing? Pin
Waverian24-Aug-04 17:23
Waverian24-Aug-04 17:23 
AnswerRe: First time using Windows Forms -- Components not appearing? Pin
sreejith ss nair24-Aug-04 18:53
sreejith ss nair24-Aug-04 18:53 
QuestionSingleton ? Pin
Christian Graus24-Aug-04 16:06
protectorChristian Graus24-Aug-04 16:06 
AnswerRe: Singleton ? Pin
Heath Stewart24-Aug-04 16:11
protectorHeath Stewart24-Aug-04 16:11 
QuestionHashtable error: "Object reference not set to an instance of ans object."! ??? Pin
gman4424-Aug-04 15:04
gman4424-Aug-04 15:04 
Okay, my project is almost finished and this seems to be the last bug. My error is on line 613 during the last 'while' code. It seems that garbage collection has 'dumped' my initial 'hash' instance??? I then get the error message "Object reference not set to an instance of ans object."!

Q. How do I fix the code to eliminate the error???

try
{
while((line = reader.ReadLine()) != null)
{
string [] tmp = line.Split('\t');
if(tmp.Length == 2)
{
if(!hash.Contains(tmp[0]))
{
hash.Add(tmp[0], tmp[1]);
}
listBox1.Items.Add(tmp[0] + "\t" + tmp[1]);
}
}
}
finally
{
reader.Close();
}



while(myReader2.Read())
{
if (! hash.ContainsKey(str_col_DestIP.Trim()))
{
string strDestDns = "Use Other...";
}
else
{
string str = (hash[1].ToString()); // line 613
}







AnswerRe: Hashtable error: "Object reference not set to an instance of ans object."! ??? Pin
Charlie Williams24-Aug-04 15:33
Charlie Williams24-Aug-04 15:33 
GeneralRe: Hashtable error: "Object reference not set to an instance of ans object."! ??? Pin
Heath Stewart24-Aug-04 15:53
protectorHeath Stewart24-Aug-04 15:53 
GeneralRe: Hashtable error: "Object reference not set to an instance of ans object."! ??? Pin
Charlie Williams24-Aug-04 16:35
Charlie Williams24-Aug-04 16:35 
AnswerRe: Hashtable error: "Object reference not set to an instance of ans object."! ??? Pin
Heath Stewart24-Aug-04 15:51
protectorHeath Stewart24-Aug-04 15:51 
AnswerRe: Hashtable error: "Object reference not set to an instance of ans object."! ??? Pin
Jay Shankar24-Aug-04 16:09
Jay Shankar24-Aug-04 16:09 
GeneralC# CreateGraphics() Pin
Moon Boy24-Aug-04 13:01
Moon Boy24-Aug-04 13:01 
GeneralRe: C# CreateGraphics() Pin
Charlie Williams24-Aug-04 13:33
Charlie Williams24-Aug-04 13:33 
GeneralRe: C# CreateGraphics() Pin
Jay Shankar24-Aug-04 15:19
Jay Shankar24-Aug-04 15:19 
GeneralRe: C# CreateGraphics() Pin
Moon Boy24-Aug-04 16:52
Moon Boy24-Aug-04 16:52 
GeneralRe: C# CreateGraphics() Pin
leppie24-Aug-04 19:57
leppie24-Aug-04 19:57 
GeneralRe: C# CreateGraphics() Pin
Jay Shankar24-Aug-04 21:30
Jay Shankar24-Aug-04 21:30 
GeneralC# UserControl Pin
markjuggles24-Aug-04 11:20
markjuggles24-Aug-04 11:20 
GeneralRe: C# UserControl Pin
Nick Parker24-Aug-04 11:32
protectorNick Parker24-Aug-04 11:32 
GeneralRe: C# UserControl Pin
Charlie Williams24-Aug-04 11:52
Charlie Williams24-Aug-04 11:52 
GeneralRe: C# UserControl Pin
markjuggles24-Aug-04 14:27
markjuggles24-Aug-04 14:27 
QuestionC# - How to Zip file on the Web Server? Pin
HyVong24-Aug-04 9:45
HyVong24-Aug-04 9:45 
AnswerRe: C# - How to Zip file on the Web Server? Pin
Not Active24-Aug-04 9:52
mentorNot Active24-Aug-04 9:52 

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.