Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~3K People Reached
Favorite Forums
Favorite Tags
c# x 1

3 Posted Topics

Member Avatar for tphuynh

Hi, I don't under what I'm doing wrong. In my line of code I have 2 outputs: The first outout returns a value, however, when I try to output the second ConsoleLine I get a value of "0"?? I'm thinking it has something to do with Converting a string to …

Member Avatar for JerryShaw
0
163
Member Avatar for tphuynh

Hi , What do I need to modify in the "System.Text.RegularExpressions.Regex.Split(contents, "\\s+", RegexOptions.None);" so the string will also keep whitespaces? For example, in the .dat file you have: Hello Word Test1 Test2 Test3 If you noticed, I have whitespaces between each words, I want to keep that. so string[0] = …

0
61
Member Avatar for daidaiboyboy

[QUOTE=_r0ckbaer;184177][code] StreamReader objInput = new StreamReader("C:\\values.dat", System.Text.Encoding.Default); string contents = objInput.ReadToEnd().Trim(); string [] split = System.Text.RegularExpressions.Regex.Split(contents, "\\s+", RegexOptions.None); foreach (string s in split) { Console.WriteLine(s); } [/code][/QUOTE] Hi _r0ckbaer, I don't know if you are still around... What do I need to modify in the "System.Text.RegularExpressions.Regex.Split(contents, "\\s+", RegexOptions.None);" so the …

Member Avatar for tphuynh
0
2K

The End.