I want to return an array to my WP 8 page and have an error: not all code paths return a value. How can I correct it?
My WCF service has the following code:
public Point getAllusrs (int myID)
{
DataClasses1DataContext data = new DataClasses1DataContext();
var a = (from s in data.Tabs where s.u1ID == myID && s.status == true select s.u2ID).ToArray();
int inc = 0;
foreach (var d in data.Users)
{
if (a[inc] != null && d.Id == a[inc])
{
inc++;
return new Point() { Lat = d.usrLat, Lon = d.usrLong };
}
else inc++;
}
}
Pointor a singlePoint?Pointto create multiple pushpins on the map.