Example #1
0
 public Stock(string s)
 {
     _type = SecurityType.STK;
     if (!Stock.isStock(s))
     {
         return;
     }
     _sym = s;
 }
Example #2
0
        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);
        }