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

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -