private void SetRandomPropertyValues(StockData item) { item.Name = String.Format("{0}{1}{2}{3}", this.letters[this.rnd.Next(0, this.letters.Count())], this.letters[this.rnd.Next(0, this.letters.Count())], this.letters[this.rnd.Next(0, this.letters.Count())], this.letters[this.rnd.Next(0, this.letters.Count())]); item.LastUpdate = DateTime.Now; item.Change = this.rnd.NextDouble(); }
private StockData CreateNewStockItem() { var item = new StockData(); this.SetRandomPropertyValues(item); return item; }