public Stock(string s) { _type = SecurityType.STK; if (!Stock.isStock(s)) { return; } _sym = s; }
public static MarketBasket FromString(string serialBasket) { MarketBasket mb = new MarketBasket(); if ((serialBasket == null) || (serialBasket == "")) { return(mb); } string[] r = serialBasket.Split(','); for (int i = 0; i < r.Length; i++) { if ((r[i] != "") && Stock.isStock(r[i])) { mb.Add(new Stock(r[i])); } } return(mb); }