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());
}
Subscribe to:
Post Comments (Atom)
If you’re using Visual Studio to build your .NET MAUI app on a Mac, locating the IPA (iOS App Package) file can be a bit tricky
If you’re using Visual Studio to build your .NET MAUI app on a Mac , locating the IPA (iOS App Package) file can be a bit tr...
-
Sample Code: if (Email.Default.IsComposeSupported) { string subject = "Hello!"; string body = "Excellent!"; ...
-
If you’re using Visual Studio to build your .NET MAUI app on a Mac , locating the IPA (iOS App Package) file can be a bit tr...
-
Charts for Windows and web including .Net MAUI LiveCharts - LiveCharts2 (lvcharts.com)
No comments:
Post a Comment