Help with C# ERROR
by greenEYES - September 05, 2020 at 06:57 PM
#1
Photo 
[Image: quest.jpg]


Latitude= 10.000 decimal
Longitude= 40.000 decimal

string.= string does not take decimal. Why. I'm a layman at this

GeoInfo.Lat string.IsNullorEmpyt(GeoInfo.Lat) ? "N/A" : GeoInfo.Lat;
GeoInfo.Lon string.IsNullorEmpyt(GeoInfo.Lon) ? "N/A" : GeoInfo.Lon;
Reply
#2
Because Decimal or Float are not String. You have to call GeoInfo.Lat.toString() for it to work.
Reply
#3
(September 23, 2020 at 12:34 AM)sawasdikah Wrote: Because Decimal or Float are not String. You have to call GeoInfo.Lat.toString() for it to work.

GeoInfo.Lat double.Lat.ToString(); ? "N/A" : GeoInfo.Lat;
GeoInfo.Lon double.Lon.ToString(); ? "N/A" : GeoInfo.Lat;

double,Decimal or Float which is the best to get the coordinates ?

yes thanks for answering.👍
Reply
#4
(September 23, 2020 at 07:06 PM)greenEYES Wrote: GeoInfo.Lat double.Lat.ToString(); ? "N/A" : GeoInfo.Lat;
GeoInfo.Lon double.Lon.ToString(); ? "N/A" : GeoInfo.Lat;

double,Decimal or Float which is the best to get the coordinates ?

yes thanks for answering.👍

I've always used float,  you should be fine with that.
Reply

Possibly Related Threads…
Thread Author Replies Views Last Post
Help for sql error godwantchaos 2 672 June 02, 2019 at 08:31 AM
Last Post: godwantchaos

 Users browsing this thread: 1 Guest(s)