My class
object has a dictionary
in it like this:
class MyClass
{
Dictionary<string, string> Things {get; set;}
}
now I want to get the first thing to do something special on it and then if it had more members take the rest of them and do some other thing on the rest of them
I had seen some syntax for Select
statement that we could pass an "index" to Select
, I was trying to figure it out but no luck.
How would you do that?
All I wrote was something like this:
var temp = myClassObject.Things.Select((t,i) => t.Vale);
I think I can write it in a lengthier way by using .First
and Skip(1)
.