manishsawant
MIS
Hi,
I want to check if a string is a int or a number with 2 decimals or 4 decimals. I tried this
if (double.TryParse(dr[Col].ToString(),NumberStyles.Currency,CultureInfo.CurrentCulture, out result))
but it doesnt work for 4 decimals like "11.1245".
Similarly i want to check a string which might contain something like 20070518 which is a valid date for us. I want to check if this is a date in a if statement.
I am using C# 2.0.
Can anyone please help me with this.
Thanks,
Manish
I want to check if a string is a int or a number with 2 decimals or 4 decimals. I tried this
if (double.TryParse(dr[Col].ToString(),NumberStyles.Currency,CultureInfo.CurrentCulture, out result))
but it doesnt work for 4 decimals like "11.1245".
Similarly i want to check a string which might contain something like 20070518 which is a valid date for us. I want to check if this is a date in a if statement.
I am using C# 2.0.
Can anyone please help me with this.
Thanks,
Manish