SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 41 | Next

Scott Klein

"Professional LINQ"

ToString();
And here are the results from it:

Scott
Klein

While the capability to easily define the contents of the XML is cool, the real power comes from the
ability to pass an argument that is not user-defined but in reality comes from an outside source, such as
a query, which can be enumerated and turned into XML via the standard query operators. For example,
the following takes the array of names from the first example and uses that as the source of the query for
which to construct XML:
string [] firstnames = { "Scott", "Steve", "Ken", "Joe", "John",
"Alex", "Chuck", "Sarah"};
var r = new XElement("Friends",
from fn in firstnames
where fn.StartsWith("S")
select new XElement("Name", fn))
textbox1.Text = rToString();
Here are the results from this code:

Scott
Steve
Sarah

13
Part I: Introduction to Project LINQ
This isn??™t to say that I only have friends whose first names begin with the letter S, but you get the idea.


Pages:
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6