TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Use Two where Condition in LINQ Query in C#
Rajan Singh
Nov 16
2015
Code
1.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
System;
using
System.Linq;
namespace
CSharpLINQ
{
class
SimpleQuery
{
static
void
Main()
{
int
[] numbers = {
1, -2, 3, -3, 0, -8, 12, 19, 6, 9, 10
};
var query = from n
in
numbers where n > 0 where n < 12 select n;
foreach
(var q
in
query)
Console.Write(
"{0}\t"
, q);
}
}
}
Answer:
1 3 6 9 10
LINQ
C#
Use Two where Condition in LINQ