Hi all,
I am using Decimal.TryParse() for checking whether an string is an decimal or not. If it is an decimal, then convert the value to decimal & then stored it into a variable of type decimal.
This method is able to check for decimal but it is not returning any value. Refer below code:
String strAmount = 10.00;
Decimal decAmount;
Boolean isAmount;
isAmount = Decimal.TryParse(strAmount , decAmount);
Write line → isAmount.ToString
Write line → decAmount.ToString
isAmount is true but decAmount is 0.