Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is LINQ the 'VFP-inspired' addition to .NET?
Message
 
 
À
14/09/2005 20:13:45
Information générale
Forum:
Windows
Catégorie:
Informatique en général
Divers
Thread ID:
01049627
Message ID:
01049718
Vues:
10
Hi, Juan.

>You can smell something about it, but is also some of ObjectSpaces concept inside this project as well.
>
>Just got out of Anders Heljberg session and this piece of code reminded me of the way we define variables in foxpro
>//
>var q =
> from c in db.Customers
> where c.city == 'London'
> Select(c => c.CompanyName);
>
>ObjectDumper.WriteLine(q)
>//
>"Q" would hold a list of all the company names in London.
>
>there's no definition of the data type of the variable it comes from the result of the select statement.

Well, actually, there is no implicit definition, but q is still strongly typed. The difference is that its type is inferred from the assignment. In this case, it would be an array or ArrayList. But there is something pretty different here, and this is that the equivalent of a VFP cursor is not a relational thing anymore, but an object, and you can even get a hierarchical object (a list of lists), inheriting from a previously defined class or (new in C# 3), defined in place as an anonymous type (something very handy).

There are more simmilarities to Delphi (a language that a guy called Anders something desinged) that to VFP. The important thing for me is that it resolves part of the VFP domain space pretty well (or at least it seems by now).

See you,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform