这是我的班级声明
public class PlacesAPIResponse
{
public string formatted_address { get; set; }
public Geometry geometry { get; set; }
public Location location { get; set; }
public string icon { get; set; }
public Guid id { get; set; }
public string name { get; set; }
public string reference { get; set; }
public string[] types { get; set; }
}
public class Geometry
{
Location location { get; set; }
}
public class Location
{
public double lat { get; set; }
public double lon { get; set; }
}
当我尝试像这样访问它时,我得到“由于保护级别而无法访问”
PlacesAPIResponse response = new PlacesAPIResponse();
string lon = response.geometry.location.lon;
我做错了什么?