Click here to Skip to main content
15,883,809 members
Home / Discussions / C#
   

C#

 
GeneralRe: please i need the complation of 4 queen Pin
amrreko9-Apr-10 8:27
amrreko9-Apr-10 8:27 
GeneralRe: please i need the complation of 4 queen Pin
Dave Kreskowiak9-Apr-10 8:34
mveDave Kreskowiak9-Apr-10 8:34 
GeneralRe: please i need the complation of 4 queen Pin
amrreko9-Apr-10 8:44
amrreko9-Apr-10 8:44 
GeneralRe: please i need the complation of 4 queen Pin
Pete O'Hanlon9-Apr-10 9:16
mvePete O'Hanlon9-Apr-10 9:16 
QuestionUnixCrypt algorithm Pin
sekannak9-Apr-10 4:22
sekannak9-Apr-10 4:22 
AnswerRe: UnixCrypt algorithm Pin
Ian Shlasko9-Apr-10 4:39
Ian Shlasko9-Apr-10 4:39 
AnswerRe: UnixCrypt algorithm Pin
Sandesh M Patil9-Apr-10 4:50
Sandesh M Patil9-Apr-10 4:50 
Questionfile contents Pin
Morgs Morgan9-Apr-10 4:21
Morgs Morgan9-Apr-10 4:21 
Hi huys
I have small issue, look at my code below:
HttpPostedFile myFile = files.PostedFile;// Get a reference to PostedFile object
                string strFilename = Path.GetFileName(myFile.FileName);
                string[] lines = File.ReadAllLines(strFilename);
                foreach (string s in lines)
                {
                    string[] fragments = s.Split(',');

                    errors.Text += fragments[0] + " ";
                    errors.Visible = true;
                }

The contents of my file look like:
Kiss,Simwaba,morgan@domain.co.za,0743720187,1987/12/31
Person,Simwaba,morgan@domain.co.za,0743720187,1987/12/31

what happens is that when i pick
errors.Text += fragments[0];

it returns "Kiss Person" which are the first index[0]s in both lines.
I just want to retrieve "Kiss" how can I do this?Confused | :confused:
Please help me in case am making a mistake somewhere.
Morg
AnswerRe: file contents Pin
Keith Barrow9-Apr-10 4:26
professionalKeith Barrow9-Apr-10 4:26 
GeneralRe: file contents Pin
Morgs Morgan9-Apr-10 4:42
Morgs Morgan9-Apr-10 4:42 
GeneralRe: file contents Pin
Keith Barrow9-Apr-10 4:48
professionalKeith Barrow9-Apr-10 4:48 
GeneralRe: file contents Pin
Morgs Morgan9-Apr-10 4:56
Morgs Morgan9-Apr-10 4:56 
GeneralRe: file contents Pin
Keith Barrow9-Apr-10 5:00
professionalKeith Barrow9-Apr-10 5:00 
GeneralRe: file contents Pin
Morgs Morgan9-Apr-10 5:33
Morgs Morgan9-Apr-10 5:33 
GeneralRe: file contents Pin
Keith Barrow9-Apr-10 5:42
professionalKeith Barrow9-Apr-10 5:42 
GeneralRe: file contents Pin
Morgs Morgan9-Apr-10 5:51
Morgs Morgan9-Apr-10 5:51 
AnswerRe: file contents Pin
Sandesh M Patil9-Apr-10 4:46
Sandesh M Patil9-Apr-10 4:46 
GeneralRe: file contents Pin
Keith Barrow9-Apr-10 4:59
professionalKeith Barrow9-Apr-10 4:59 
GeneralRe: file contents Pin
Sandesh M Patil9-Apr-10 5:16
Sandesh M Patil9-Apr-10 5:16 
GeneralRe: file contents Pin
Keith Barrow9-Apr-10 5:20
professionalKeith Barrow9-Apr-10 5:20 
GeneralRe: file contents Pin
Sandesh M Patil9-Apr-10 5:25
Sandesh M Patil9-Apr-10 5:25 
GeneralRe: file contents Pin
Keith Barrow9-Apr-10 5:37
professionalKeith Barrow9-Apr-10 5:37 
GeneralRe: file contents Pin
Pete O'Hanlon9-Apr-10 7:38
mvePete O'Hanlon9-Apr-10 7:38 
GeneralRe: file contents Pin
Pete O'Hanlon9-Apr-10 8:11
mvePete O'Hanlon9-Apr-10 8:11 
AnswerRe: file contents Pin
Ghydo9-Apr-10 4:56
Ghydo9-Apr-10 4:56 

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.