For this you need to define return type as object.
public IList<object> ReturnAnonymous()
{
  return new List<object> {
     new { City="Dhaka", Name="Test 1" },
     new { City="Rajshahi", Name="Test 2" }
  };
}

 

Add new comment