using System.Collections.Generic;
public string Symbole {get;set;}
public double Price {get;set;}
List<Stock> stockList = new List<Stock>();
Console.WriteLine("Enter person details. Type '!' for the Name to stop.");
Stock Instance = new Stock();
Console.Write("Enter stock symbol:");
string symbole = Console.ReadLine();
Instance.Symbole = symbole;
Console.WriteLine("Enter stock initial price: ");
if (double.TryParse(Console.ReadLine(),out price))
Console.WriteLine("Invalid Price....., Please enter the price again");
Console.WriteLine("\nPeople Entered:");
foreach (Stock Instance in stockList)
Console.WriteLine($"Name: {Instance.Symbole}, Age: {Instance.Price}");