Published by fm on Mar 7th, 2007 in basics, c#, linq, xml with 1 Comment
System.Linq.Xml - The XML object model for Linq
XElement is the basic building block (or element) of an XML document in the System.Linq.Xml world. It is, after all, just an XML element. Using XElement, the most basic XML document can be formed with this:
PLAIN TEXT
XElement doc = new XElement("DocumentRoot");
This will give you a document that [...]
Tags:
Published by fm on Mar 5th, 2007 in c#, fun with 1 Comment
After spending a lot of years writing C code it is sometimes hard to get some of those "tricks" out of your mind. The thing I always felt about C was it seemed to encourage you figure out or use cool tricks. Couple that with graphics coding you can get some strange stuff like the [...]
Tags:
Published by fm on Feb 16th, 2007 in c# with 1 Comment
Did you know you can use a lambda function as an event handler?
For example:
dog.PropertyChanged += (object o, PropertyChangedEventArgs a)
[...]
Tags:
Published by fm on Feb 16th, 2007 in basics, c#, visual studio 2008 with 1 Comment
Some basics.
Anonymous types are an important new feature that allow, at compile time, for the type information for a variable be dropped by the developer. For example:
1: var x = 128;
Line 1 declares the variable x as a variable having an anonymous type using the var keyword. At this point, nothing [...]
Tags: