Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
int [] nums = {1, -2, 3, 0, -4, 5};
var posNums = from n in nums where n > 0  select n;


hello, how can i code with Query method
Posted
Updated 16-Jun-15 18:38pm
v2
Comments
Santosh K. Tripathi 17-Jun-15 0:38am    
what you tried?
Member 11771402 17-Jun-15 1:14am    
i want to coding with "query method"

1 solution

Do you mean:
C#
int [] nums = {1, -2, 3, 0, -4, 5};
var posNums = nums.Where(n => n > 0);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900