Click here to Skip to main content
15,886,810 members
Home / Discussions / C#
   

C#

 
AnswerRe: NamedPipeServerStream.GetAccessControl Pin
Eddy Vluggen10-Sep-12 1:43
professionalEddy Vluggen10-Sep-12 1:43 
GeneralRe: NamedPipeServerStream.GetAccessControl Pin
True_Posi10-Sep-12 2:25
True_Posi10-Sep-12 2:25 
GeneralRe: NamedPipeServerStream.GetAccessControl Pin
Eddy Vluggen10-Sep-12 2:42
professionalEddy Vluggen10-Sep-12 2:42 
GeneralRe: NamedPipeServerStream.GetAccessControl Pin
True_Posi10-Sep-12 3:11
True_Posi10-Sep-12 3:11 
QuestionWhere clause in subcollection Pin
Mark Vloerjans9-Sep-12 21:18
Mark Vloerjans9-Sep-12 21:18 
QuestionRe: Where clause in subcollection Pin
Wayne Gaylard10-Sep-12 1:12
professionalWayne Gaylard10-Sep-12 1:12 
AnswerRe: Where clause in subcollection Pin
Pete O'Hanlon10-Sep-12 1:51
mvePete O'Hanlon10-Sep-12 1:51 
AnswerRe: Where clause in subcollection Pin
BobJanova11-Sep-12 0:31
BobJanova11-Sep-12 0:31 
Query methods are only for selecting or creating objects, not modifying them. So you can't pass school objects with the student list modified to only contain students studying IT, unless you create a new School.

I think you want CheckStudents to take the list of schools and the subject:

void CheckStudents(IEnumerable<School> schools, string subject){
 foreach(School school in schools){
  var students = school.Students.Where(s => s.Study == "IT");
  // do whatever with the students
 }
}


Or if you want to filter the schools you can do

CheckStudents(School.Where(s => s.Students.Any(s => s.Study == "IT")))

... but you still need to have the students within a school filtered in a separate query.
QuestionHow to convert HTML file to Excel in C# Pin
atma0019-Sep-12 20:29
atma0019-Sep-12 20:29 
AnswerRe: How to convert HTML file to Excel in C# Pin
Eddy Vluggen9-Sep-12 22:14
professionalEddy Vluggen9-Sep-12 22:14 
GeneralRe: How to convert HTML file to Excel in C# Pin
atma00110-Sep-12 6:32
atma00110-Sep-12 6:32 
GeneralRe: How to convert HTML file to Excel in C# Pin
Eddy Vluggen11-Sep-12 1:42
professionalEddy Vluggen11-Sep-12 1:42 
Questionhow can i create an interface for crystal report at user end Pin
rajeeshsays9-Sep-12 13:26
rajeeshsays9-Sep-12 13:26 
AnswerCross post Pin
Wes Aday9-Sep-12 13:59
professionalWes Aday9-Sep-12 13:59 
AnswerRe: how can i create an interface for crystal report at user end Pin
PIEBALDconsult9-Sep-12 19:42
mvePIEBALDconsult9-Sep-12 19:42 
QuestionWindows 7 and task bar - left side in C# Pin
fakir4459-Sep-12 12:25
fakir4459-Sep-12 12:25 
AnswerRe: Windows 7 and task bar - left side in C# Pin
Mycroft Holmes9-Sep-12 14:31
professionalMycroft Holmes9-Sep-12 14:31 
AnswerRe: Windows 7 and task bar - left side in C# Pin
DaveyM6910-Sep-12 2:09
professionalDaveyM6910-Sep-12 2:09 
QuestionC# share data between project files Pin
classy_dog9-Sep-12 10:26
classy_dog9-Sep-12 10:26 
AnswerRe: C# share data between project files Pin
RobCroll9-Sep-12 13:55
RobCroll9-Sep-12 13:55 
GeneralRe: C# share data between project files Pin
classy_dog9-Sep-12 16:43
classy_dog9-Sep-12 16:43 
GeneralRe: C# share data between project files Pin
RobCroll11-Sep-12 23:25
RobCroll11-Sep-12 23:25 
QuestionDataTable - Inserting columns Pin
Bart9-Sep-12 10:02
Bart9-Sep-12 10:02 
AnswerRe: DataTable - Inserting columns Pin
Mycroft Holmes9-Sep-12 14:36
professionalMycroft Holmes9-Sep-12 14:36 
GeneralRe: DataTable - Inserting columns Pin
Bart9-Sep-12 23:04
Bart9-Sep-12 23:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.