Hi,
I have a GridView and want to create an array of type struct of the GridView's float type elements.
Here is part of the code:
public struct Point
{
public float lat;
public float lon;
}
.....
public Point[] GetPoint()
{
int br = GridView1.Rows.Count;
Point[] Niza = new Point[br];
foreach (GridViewRow row in GridView1.Rows)
{
int i = 0;
[B]Niza[i].lat = float.Parse(row.Cells[3].Text, System.Globalization.NumberStyles.Any);
Niza[i].lon = float.Parse(row.Cells[4].Text, System.Globalization.NumberStyles.Any);[/B] i++;
}
return Niza;
}
This is not OK. I debuged the code and I got right values on the right side, but elements in the array got values 0.0, so left side of the equation is 0.0.
Can anybody help me please?
Thank you in advance.