Thursday, 15 May 2014

c# - Declare variable for ConcurrentDictionary.Select() -



c# - Declare variable for ConcurrentDictionary.Select() -

i have simple concurrentdictionary i'm trying select subset of values.

i'm using code , way can work var declare teststudents. proper declaration code? tried list , ienumratable didn't work.

public concurrentdictionary<string, student> _student = new concurrentdictionary<string, student>(); var teststudents = this._student.values.select( s => s.name = "jack");

thanks everyone. looks i'm using wrong method. where method needed use.

ienumerable<student> teststudents = this._student.values.where( s => s.name = "jack");

c# linq dictionary

No comments:

Post a Comment