Index CreateBenchmark(string country, string benchId, string benchmark, string zone) { Index index = new Index(country, benchId, benchmark, zone); bool newStock = true; int i = 0; while (newStock && i < equities.Count()) { if (equities.ElementAt(i) is Index) { newStock = !(equities.ElementAt(i).Equals((Object)index)); } i++; } if (newStock) { if (index.Download(start, end)) { equities.Add(index); } } else { i--; } return((Index)equities.ElementAt(i)); }
Index CreateBenchmark(string country,string benchId, string benchmark,string zone) { Index index = new Index(country, benchId, benchmark, zone); bool newStock=true; int i = 0; while (newStock && i < equities.Count()) { if( equities.ElementAt(i) is Index) newStock = !(equities.ElementAt(i).Equals((Object)index)); i++; } if (newStock) { if (index.Download(start, end)) equities.Add(index); } else i--; return (Index)equities.ElementAt(i); }