CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Dec 2011
    Posts
    73

    [RESOLVED] Convert from c# TryParse

    Hi, In c# the following codes are working good

    decimal number1;
    if (!decimal.TryParse(MyTxtBxStr, out number1))
    {
    MessageBox.Show("Invalid Value....Try Again");
    }

    And when I try to convert it like the following code

    System:ecimal MyNumber1;
    if (!Decimal::TryParse(MyTxtBxStr, MyNumber1)){
    MessageBox.Show("Invalid Value....Try Again");
    }

    It's giving error like Syntax error 2143 missing ';' before '.'


    Thanks for the helps
    Thanks Again
    Last edited by MAHEY; May 19th, 2014 at 08:49 PM. Reason: Code Block

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured