Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C#! HELP Please!

Name: Jonas 2011-12-02 12:36

I rellly need help with c#.

Okay i was going sort words from a text file and then write the sorted version into the text file. Everything works but 200 first lines are only blankspaces.

How can i remove them for the string?

Ive tried

string out_put = in_put.trim();

string out_put = Regex.Replace(in_put, " ", " ");

Anyone who can help?

Name: Anonymous 2011-12-02 12:39

Lisp is shit.

Name: Anonymous 2011-12-02 12:43

if (out_put.Length == 0) continue;

Name: Jonas 2011-12-02 12:49

>> Example of my code where it writes the sorted string into the file.

foreach (string word in words) 
 {
   string words2 = Regex.Replace(word, " ", " ");
  
   OR

   string words2 = word.trim();


   Console.WriteLine(words2);
   outfile.WriteLine(words2);
 
 }

Name: Anonymous 2011-12-02 13:27

>>4
>>3 gave you the answer.

Name: Anonymous 2011-12-03 5:18

Regex.Replace(word, " ", " ");
Replace " " with " "
wtf did I just read.

Don't change these.
Name: Email:
Entire Thread Thread List