LINQ

  • Thread starter Thread starter essamce
  • Start date Start date
E

essamce

Guest
hi

how can i do something like that in LINQ,



ObservableCollection<SimpleLayer> oCollection = new ObservableCollection<SimpleLayer>
(
() => {
for (int i = 0; i < bigLayers.Count; i++)
{
return new SimpleLayer(i /*layerId*/, bigLayers.Name, bigLayers.Color);
}
}

// the next code not a solution cuz i want a counter
//from layer in dxfAllLayers
////where true
//select new SimpleLayer(1 /*layerId*/, layer.Name, AciColorToHex(layer.Color))
) ;


note: i don't want to use

ObservableCollection<SimpleLayer> oCollection;

for (int i = 0; i < bigLayers.Count; i++)
{
oCollectio.Add( SimpleLayer(1 /*layerId*/, dxfAllLayers.Name, bigLayers.Color));
}


thanks in advance.

Continue reading...
 
Back
Top