ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1008. Image Encoding

ReadLine().Trim() ===> Crash #2
Posted by DR. Zhihua Lai 15 Apr 2013 18:09
Strange,

string s = Console.ReadLine(); ===>AC

string s = Console.ReadLine().Trim(); ===> Runtime Error (AV #2)
string s = Console.ReadLine().TrimEnd(); ====> Same as above

who can explain this?
Re: ReadLine().Trim() ===> Crash #2
Posted by Vladimir Yakovlev (USU) 16 Apr 2013 02:08
Console.ReadLine() == null at the end of file
Re: ReadLine().Trim() ===> Crash #2
Posted by DR. Zhihua Lai 16 Apr 2013 04:18
thanks...
yes. it all makes sense now.