Click here to Skip to main content
15,667,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,


When i attend an interview they asked me to do this program. how can i do this program. Please help me to do this.


Write a program in C# to store the information of a user such as user_id, user_name, etc..to a File using IOStream. And to search information by giving user_id. All the details should be displayed after searching.(hint : windows or console application)
Posted
Comments
Sergey Alexandrovich Kryukov 17-Dec-12 1:11am    
Why not simply reading the help?
—SA

The interviewers probably wanted to understand if you were aware about the various file modes e.g. open, append etc.

There are a number of good resources that discuss file I/O on the internet.
http://msdn.microsoft.com/en-us/library/aa287548%28v=vs.71%29.aspx[^]
http://msdn.microsoft.com/en-us/library/8bh11f1k.aspx[^]
http://www.csharp-station.com/HowTo/ReadWriteTextFile.aspx[^]
 
Share this answer
 
After the interview? It's too late to answer the interview question. Better learn the whole System.IO. And, pretty much all of BCL and some other parts of FCL. Well, I cannot guarantee they will ask it all at your next interviews, but I'm pretty much sure, the next questions will be very different. :-)

And the interview preparations is the useless activity. Please read this: SSRS interview questions and answers[^].

—SA
 
Share this answer
 
Comments
afsal.mp 17-Dec-12 1:43am    
Hi,
it is not for the interview purpose. i need just aware of that.
thanks
Sergey Alexandrovich Kryukov 17-Dec-12 9:53am    
To be aware, as I say, learn whole System.IO — it's not so big.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900