[Mono-list] Re: Is this a bug?

Robert Jordan robertj at gmx.net
Thu Oct 6 10:31:36 EDT 2005


Paul F. Johnson wrote:
> Hi.
> 
> I'm not too sure if this is or isn't a bug.
> 
>>From what I can see on MSDN, a line such as
> 
> foo = Console.ReadLine().ToInt32();
> 
> should be fine. Yet if I include it in my source, I see the error
> 
> error:CS0117: `string' does not contain a definition for `ToInt32()'
> 
> Have I found a bug?

No. Console.ReadLine() returns a string, and the class string
doesn't define ToInt32. You've probably seen a C# 3.0 sample.

Rob



More information about the Mono-list mailing list