Categories
October Surprise 2024

c# – How to handle null values in linq? – Stack Overflow

_AttendedSubjects = GetAttendedSubjects(q._RollNumber) }; }).Where(q => q != null).ToList(); This checks that you do not do a Where operation on a null object and filter out any null results.