I want to add new object to a list: My code:
List abc = new List(); abc.Add(new geo_tag() { latitude = 111, longitude = 122, un
The object initializer syntax you are using came with C# 3.0. For 2.0 you have to use
List abc = new List(); geo_tag tag = new geo_tag(); tag.latitude = 111; tag.longitude = 122; tag.unit = "SSS"; abc.Add(tag);