linq c# or

C#
filteredTasks = filteredTasks.Where(p => p.TaskStateID == 10 || 
                                         p.TaskStateID == 11 || 
                                         p.TaskStateID == 12);
Source

Also in C#: