LINQ to Objects

LINQ allows to query any set that implements IEnumerable, IEnumerable<T> or IQueryable<T>. Array class has extension method Cast<T> which returns IEnumerable<T>, so any Array can be also querable srcExpr. Let's make DNS query with LINQ and find all google.com addresses. GetHostEntry() method returns array of IPAddress.
      
IEnumerable list = Dns.GetHostEntry("www.google.com").AddressList;

var result = 
    from s in list
    let addr = s.ToString()
    select new { addr } ;

foreach (var a in result)
    Console.WriteLine(a);

Listing 5.

No comments:

HOWTO: Repair Logitech M325 Mouse

FixIt says that you will find single screw under CE label. It isn't always true.