unity3d - System.in for C#? -
i coding bufferedreader in unity3d c# file. when ever use line of code says there error of: "parser error:identifier expectied, "in" keyword" , when code run in java there not error. why doesn't system.in exist in c# , how fix it?
my code:
bufferedreader infromuser = new bufferedreader(new inputstreamreader(system.in));
system.in part of java standard library, not part of .net standard library , not compile.
for c# have use console.in. textreader. there not real equivalent of bufferedreader in c# (that supports calls). textreader has read , readline method, seems behave more or less same. should replace with:
textreader tr = console.in; //use textreader infromuser as @blassoriano says, question aims find behavioral equivalent of bufferedreader.
furthermore @kenwhite says, copy pasting source code without understanding underlying idea bad idea. fact think code valid c# code, not promising.
Comments
Post a Comment