[Mono-list] My code runs on the Visual C # 2010, but in monod evelop 2.8 does not work. What is it?
ian.norton-badrul at thales-esecurity.com
Fri Oct 14 02:39:22 EDT 2011
On Fri, Oct 14, 2011 at 07:18:34AM +0100, Stifu wrote:
> So this tells us that what fails is the int.Parse() instruction.
> The changes I proposed were not meant to make it "work", just to try to
> debug the problem, as you didn't give us the Exception message at first.
> So, it seems like Console.ReadLine() returns null rather than a string, for
> some reason.
It is allowed to return null.
So, I would use String.IsNullOrEmpty(str) instead
> mazoni_ wrote:
> > This is error:
> > Unhandled Exception: System.ArgumentNullException: Value cannot be null.
> > Parameter name: String
> > at System.Number.StringToNumber(String str, NumberStyles options,
> > NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
> > at System.Number.ParseInt32(String s, NumberStyles style,
> > NumberFormatInfo info)
> > at Trab0801.Program.Main(String args) in
> > e:\Documentos\Estudos\aulas_csharp\codigos_csharp\Trab0801\Trab0801\Program.cs:line
> > 28
> > What is it?
> > This is my code, and in Visual C# it's work =]
> > http://paste.ubuntu.com/707722/
> > I made the changes mentioned in the previous post and did not work. Can
> > anyone help me please?
> View this message in context: http://mono.1490590.n4.nabble.com/My-code-runs-on-the-Visual-C-2010-but-in-monodevelop-2-8-does-not-work-What-is-it-tp3897944p3903930.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> Mono-list maillist - Mono-list at lists.ximian.com
More information about the Mono-list