using System.Collections.Generic;
public static void Main(string[] args)
RealEstate manager = new RealEstate();
int n = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < n; i++)
int id = Convert.ToInt32(Console.ReadLine());
string name = Console.ReadLine();
string type = Console.ReadLine();
double price = Convert.ToDouble(Console.ReadLine());
string address = Console.ReadLine();
manager.property.Add(new Property(id, name, type, price, address));
int choice = Convert.ToInt32(Console.ReadLine());
string address = Console.ReadLine();
List<Property> results = manager.getProperty(address);
Console.WriteLine("No property found with given address");
foreach(Property result in results)
Console.WriteLine(result.id + " "+":"+" "+ result.name +","+ result.name);
string type = Console.ReadLine();
int resultCount = manager.getCount(type);
Console.WriteLine("No property found with given type");
Console.WriteLine(resultCount);
class Property : IComparable<Property>
public int id { get; set; }
public double price { get; set; }
public string name { get; set; }
public string type { get; set; }
public string address { get; set; }
public Property(int id, string name, string type, double price, string address)
public int CompareTo(Property other)
return this.id.CompareTo(other.id);
public List<Property> property = new List<Property>();
public List<Property> getProperty(string address)
List<Property> temp = new List<Property>();
foreach (Property propertyInstance in property)
if (propertyInstance.address.Contains(address))
temp.Add(propertyInstance);
public int getCount(string type)
foreach (Property propertyInstance in property)
if (type == propertyInstance.type)