Valhalla Legends Forums Archive | .NET Platform | Some Java to C# translation...

AuthorMessageTime
DaRk-FeAnOr
I need the C# equivalents of the following java:

BufferedReader
StringTokenizer
InputStream

Working on input / output and this stuff would really help :P
Thanks for anything that you can offer.
December 10, 2003, 3:59 AM
K
BufferedReader ==> StreamReader
StringTokenizer ==> ???
InputStream ==> FileStream / Console.OpenStandardInput() depending on what you want to do.

Please excuse Bannana Schnapps imparement.
December 10, 2003, 4:59 AM
Myndfyr
You can tokenize a string with a single character or with an array of characters by using the following syntax:

[code]
char[] mySplittingChars = new char[] {
' ',
',',
'.'
};

string[] tokenizedString = s_input.Split(mySplittingChars);
[/code]
December 10, 2003, 9:01 PM
K
[quote author=Myndfyre link=board=37;threadid=4165;start=0#msg34648 date=1071090076]
You can tokenize a string with a single character or with an array of characters by using the following syntax:

[code]
char[] mySplittingChars = new char[] {
' ',
',',
'.'
};

string[] tokenizedString = s_input.Split(mySplittingChars);
[/code]
[/quote]

Ah, there you go. I was thinking in terms of classes, so Split() didn't even cross my mind.
December 10, 2003, 9:20 PM

Search