[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::Decimal 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
Re: Convert from c# TryParse
First, edit your post adding Code tags around the code snippets. Otherwise your code is unreadable,
Second:
Quote:
Originally Posted by
MAHEY
...
It's giving error like Syntax error 2143 missing ';' before '.'
in what line?
See also Compiler Error C2143
Re: Convert from c# TryParse
Hi VictorN,
Thanks for your reply. (1) When I try to make it as code tag, it has not accepted....You can find it on my edit reason.
(2)Syntax error showing on the below line
MessageBox.Show("Invalid Value....Try Again");
Thanks
Re: [RESOLVED] Convert from c# TryParse
Code tags are [ code] put code here [/ code] minus the spaces.
Replace . with ::
Code:
MessageBox::Show("Invalid Value....Try Again");