--- [EMAIL PROTECTED] escreveu: 
> Hello, i have just discovered mono and c#, so sorry for the newbie question.
> I have tried to compile a c# source that does that
> 
> using System;
> ...
> int partants;
> partants=Console.ReadLine().ToInt32();
> ...
> 
> 
> But i get the following error message:
> Pronos.cs(27) error CS0117: `System.String' does not contain a definition for
> `ToInt32'
> 
> Has this function not been implemented, or am i wrong somewhere ?
> 

Hi, this method was implemented. But the IConvertible interface was implemented
using a feature of .Net called "explicit interface implementation". When
implemented like this, it can't be access directly. You must cast to the
IConvertible interface so that you can access its methods. You should have
something like this:

partants=((IConvertible)Console.ReadLine()).ToInt32(null);

I hope it helps.


=====
Regards,
Francisco Figueiredo Jr.

_______________________________________________________________________
Yahoo! PageBuilder
O super editor para cria��o de sites: � gr�tis, f�cil e r�pido.
http://br.geocities.yahoo.com/v/pb.html

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to