Click here to Skip to main content
15,923,142 members
Home / Discussions / C#
   

C#

 
GeneralRe: KeyChar reference, does it vary with keyboard? Pin
c#_keithy8-Oct-07 3:35
c#_keithy8-Oct-07 3:35 
QuestionHow to determine provider type Pin
jpasher8-Oct-07 2:41
jpasher8-Oct-07 2:41 
QuestionCommunicating with a service Pin
Lars Lie8-Oct-07 2:30
Lars Lie8-Oct-07 2:30 
AnswerRe: Communicating with a service Pin
Judah Gabriel Himango8-Oct-07 4:34
sponsorJudah Gabriel Himango8-Oct-07 4:34 
Questionusing events as arguments Pin
Bekjong8-Oct-07 2:30
Bekjong8-Oct-07 2:30 
AnswerRe: using events as arguments Pin
Pete O'Hanlon8-Oct-07 2:41
mvePete O'Hanlon8-Oct-07 2:41 
GeneralRe: using events as arguments Pin
Bekjong8-Oct-07 3:11
Bekjong8-Oct-07 3:11 
GeneralRe: using events as arguments Pin
Scott Dorman8-Oct-07 3:57
professionalScott Dorman8-Oct-07 3:57 
GeneralRe: using events as arguments Pin
Pete O'Hanlon8-Oct-07 4:00
mvePete O'Hanlon8-Oct-07 4:00 
QuestionWSS 3.0 Config Database Pin
lsconyer8-Oct-07 2:22
lsconyer8-Oct-07 2:22 
Questionhow to read rext file? Pin
P_Elza8-Oct-07 0:52
P_Elza8-Oct-07 0:52 
AnswerRe: how to read rext file? Pin
Andrei Ungureanu8-Oct-07 0:59
Andrei Ungureanu8-Oct-07 0:59 
AnswerRe: how to read rext file? Pin
rajansethi8-Oct-07 2:47
rajansethi8-Oct-07 2:47 
QuestionHow to convert a PDF document to JPG. Pin
Exelioindia8-Oct-07 0:48
Exelioindia8-Oct-07 0:48 
AnswerRe: How to convert a PDF document to JPG. Pin
Christian Graus8-Oct-07 1:12
protectorChristian Graus8-Oct-07 1:12 
GeneralRe: How to convert a PDF document to JPG. Pin
Exelioindia8-Oct-07 2:28
Exelioindia8-Oct-07 2:28 
GeneralRe: How to convert a PDF document to JPG. Pin
Pete O'Hanlon8-Oct-07 2:43
mvePete O'Hanlon8-Oct-07 2:43 
QuestionWindowsPrincipal object gives null value for username when checked in component Pin
Naveen S H8-Oct-07 0:41
Naveen S H8-Oct-07 0:41 
QuestionWhere will be the assembly stores in the System Pin
pashitech8-Oct-07 0:40
pashitech8-Oct-07 0:40 
AnswerRe: Where will be the assembly stores in the System Pin
Pete O'Hanlon8-Oct-07 1:45
mvePete O'Hanlon8-Oct-07 1:45 
QuestionError while using System.Net.Mail.SmtpClient to send mail Pin
A M SOMAN7-Oct-07 22:59
A M SOMAN7-Oct-07 22:59 
AnswerRe: Error while using System.Net.Mail.SmtpClient to send mail Pin
Andrei Ungureanu7-Oct-07 23:23
Andrei Ungureanu7-Oct-07 23:23 
GeneralRe: Error while using System.Net.Mail.SmtpClient to send mail Pin
A M SOMAN8-Oct-07 0:49
A M SOMAN8-Oct-07 0:49 
GeneralRe: Error while using System.Net.Mail.SmtpClient to send mail Pin
Andrei Ungureanu8-Oct-07 1:02
Andrei Ungureanu8-Oct-07 1:02 
QuestionHandling Text data taken from file Pin
rsaint277-Oct-07 22:54
rsaint277-Oct-07 22:54 
Hello,

I'm doing some free-time programming with learning objective (in c#), and one of my "projects" led me to separate data taken from a text file.
Opening and retrieving data is no problem, I just put it into a ArrayList of string element for now. But when I want to separate the data from that ArrayList, the only solution I've come up with is as 'ugly' as this one:

ArrayList stream = new ArrayList();
(some code here)
foreach (string str in stream)
{
if (str.contains(some string))
{
do something
}
else
{
if (str.contains(some other string))
{
do other thing
}
else
{
(... even more if's)
}
}
}

I think there should be another way to do this, specially without so much "contains" operations that are time consuming.
Can you give me some directions on how to break such items apart?
I'm thinking this could also be used in other areas like socket communication.

This feels like a very dumb question to me, but if I don't ask, I'll never learn.


Thanks for any help you can give me.

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.