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

C#

 
GeneralRe: Microsoft Visual Studio.NET IDE Help Required Pin
Heath Stewart24-Aug-04 7:48
protectorHeath Stewart24-Aug-04 7:48 
GeneralRe: Microsoft Visual Studio.NET IDE Help Required Pin
Heath Stewart24-Aug-04 7:38
protectorHeath Stewart24-Aug-04 7:38 
QuestionHow do you create skins in c-sharp .net, or atleast custom-made buttons? Pin
Pyro Joe23-Aug-04 16:00
Pyro Joe23-Aug-04 16:00 
AnswerRe: How do you create skins in c-sharp .net, or atleast custom-made buttons? Pin
S Sansanwal23-Aug-04 18:35
S Sansanwal23-Aug-04 18:35 
QuestionHashtable reading text file??? Pin
gman4423-Aug-04 12:50
gman4423-Aug-04 12:50 
AnswerRe: Hashtable reading text file??? Pin
Nick Parker23-Aug-04 13:36
protectorNick Parker23-Aug-04 13:36 
GeneralRe: Hashtable reading text file??? Pin
gman4423-Aug-04 14:50
gman4423-Aug-04 14:50 
GeneralRe: Hashtable reading text file??? Pin
Kika_24-Aug-04 1:46
Kika_24-Aug-04 1:46 
I think you have incorrect format of input file. Somewhere there are empty strings or parts of string are not delimited with tab symbol
modify the code like this

private Hashtable GetHashtableFromFile(string file)
{
Hashtable ht = new Hashtable();
string line = string.Empty;
using(StreamReader reader = new StreamReader(file))
{
int i = 0;
while((line = reader.ReadLine()) != null)
{
i++;
string[] args = line.Split(new char[]{' '});
if (args.Length != 2)
{
Console.WriteLine("Invalid input string: " + i.ToString());
continue;
}
ht.Add(args[0], args[1]);
Console.WriteLine("IP:{0}, Site:{1}", args[0], args[1]);
}
}

return ht;

}

Invalid string will be skiped and appropriate message displayed
GeneralUndo/Redo and dynamic lists in Property Grid Pin
smartyosu23-Aug-04 12:33
smartyosu23-Aug-04 12:33 
GeneralRe: Undo/Redo and dynamic lists in Property Grid Pin
leppie23-Aug-04 21:44
leppie23-Aug-04 21:44 
GeneralRe: Undo/Redo and dynamic lists in Property Grid Pin
Heath Stewart24-Aug-04 7:33
protectorHeath Stewart24-Aug-04 7:33 
GeneralForcing a class to provide a specific ctor Pin
matthias s.23-Aug-04 11:45
matthias s.23-Aug-04 11:45 
GeneralRe: Forcing a class to provide a specific ctor Pin
Werdna23-Aug-04 12:09
Werdna23-Aug-04 12:09 
GeneralThanks! Pin
matthias s.23-Aug-04 12:55
matthias s.23-Aug-04 12:55 
GeneralRe: Forcing a class to provide a specific ctor Pin
Charlie Williams23-Aug-04 12:11
Charlie Williams23-Aug-04 12:11 
GeneralFileStrea,m Pin
Christian Graus23-Aug-04 11:28
protectorChristian Graus23-Aug-04 11:28 
GeneralRe: FileStrea,m Pin
Colin Angus Mackay23-Aug-04 11:36
Colin Angus Mackay23-Aug-04 11:36 
GeneralRe: FileStrea,m Pin
Christian Graus23-Aug-04 11:59
protectorChristian Graus23-Aug-04 11:59 
GeneralRe: FileStrea,m Pin
Heath Stewart24-Aug-04 7:26
protectorHeath Stewart24-Aug-04 7:26 
GeneralPacket Monitor Pin
Member 131332123-Aug-04 11:14
Member 131332123-Aug-04 11:14 
GeneralRe: Packet Monitor Pin
eggie523-Aug-04 15:25
eggie523-Aug-04 15:25 
GeneralRe: Packet Monitor Pin
leppie23-Aug-04 21:46
leppie23-Aug-04 21:46 
GeneralAmazon.com API 4.0 Help Pin
j1e1g123-Aug-04 11:06
j1e1g123-Aug-04 11:06 
GeneralRe: Amazon.com API 4.0 Help Pin
Heath Stewart24-Aug-04 7:21
protectorHeath Stewart24-Aug-04 7:21 
GeneralParallel port Pin
Christian Graus23-Aug-04 10:42
protectorChristian Graus23-Aug-04 10:42 

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.