public virtual void Display() { foreach (object o in array) { Tradable test = o as Tradable; if (test != null) { Console.WriteLine(test.symbol); } Futures test2 = o as Futures; if (test2 != null) { Console.WriteLine("Futures underlying=" + test2.underlying); Console.WriteLine("Theroratical Price=" + test2.TheoraticalPrice()); } Option test3 = o as Option; if (test3 != null) { Console.WriteLine("Option underlying=" + test3.underlying); Console.WriteLine("Theroratical Price=" + test3.TheoraticalPrice()); } } }
public void Add(Tradable t) { }
public void Add(Tradable t) { array.Add(t); }
public virtual void Add(Tradable t) { }