LINQ - Using Where Sample
Following sample illustrate how to use Where in LINQ
---------------------------------------------
using System.Linq;
using System.Collections;
ArrayList objArryList = new ArrayList();
objArryList.Add(1);
objArryList.Add(22);
objArryList.Add(33);
objArryList.Add(14);
//Convert from ArrayList to Array
int[] arrNumbers = (int[])objArryList.ToArray(typeof(int));
//display values <15
var lowNums =
from n in arrNumbers
where n < 15
select n;
foreach (var x in lowNums)
{
MessageBox.Show (x.ToString());
}
Showing posts with label LINQ. Show all posts
Showing posts with label LINQ. Show all posts
Monday, July 11, 2011
Subscribe to:
Posts (Atom)
How to upload app to macOS
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
-
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
-
Generating an API Key Before you can add an Apple Developer Account to Visual Studio, you'll need to generate an API Key. Generating a...
-
Log in to the Play Console: Go to the Play Console website ( play.google.com/console ) and log in with your Google Play Developer account....