1
Answer

why do i get this exception in asp.net?

Madhu Patel

Madhu Patel

1y
47
1

System.NullReference.Exception in my asp.net project which is built on C#5

Answers (1)
1
Nitin Sontakke

Nitin Sontakke

NA 11.7k 2.2k 8y
You have used int.TryParse, similarly just use double.TryParse. That's all you have to do.
Accepted
2
ketan borsdiya

ketan borsdiya

NA 1.5k 3k 8y
Hi Raja,
Use below code snippet for your problem,
var regex = new Regex(@"^[0-9]*(?:\.[0-9]*)?$");
if (regex.IsMatch(ds.Tables[s].Rows[i][Columncountvalue + 10].ToString().Trim()))
{
//statement
}
0
Raja

Raja

NA 1.7k 45.2k 8y
Thank you so much