LA.NET [EN]

April, 2008Archive

Apr 29

LINQ To XML: building documents with a functional approach

Posted in C#       Comments Off on LINQ To XML: building documents with a functional approach

In the previous post I”ve talked about some of the classes you”ll find in this new API. Today we”ll see how easy it is to create a new XML document with the new API. Most of the time, you”ll end up working with the XElement or XAttribute classes. Lets start with an existing XML tree: […]

Read the rest of this entry »

Apr 28

LINQ To XML: I''m hooked!

Posted in C#       Comments Off on LINQ To XML: I''m hooked!

I”ve just started doing some LINQ To XML and I can assure you that the new API is really great! Just take a look at the new Object Model introduced by the System.XML.Linq assembly: Today I”ll just cover the basics (really a quick presentation of the most important elements you can find in the new […]

Read the rest of this entry »

Apr 26

.NET 2.0 introduced Nullable value types. As you surely know by now, you cannot set a value type to null. Here”s an example: Int32 myVar = null; //error: myVar cannot be set to null This can be easily solved by transforming myVar into a Nullable type: Nullable<Int32> myVar = null; If you prefer, you can […]

Read the rest of this entry »

Apr 26

Type inference in C# 3.0

Posted in C#, Trivia       Comments Off on Type inference in C# 3.0

My friend Paulo published a post that talks about type inference and how it might evolve in the next years. Even though type inference”s main objective is to support LINQ (in fact, most of the new stuff that C#3.0 introduced is only there to support LINQ), I must say that I”ve been enjoying it a […]

Read the rest of this entry »

Apr 16

[Update: Thanks to Mike for uncovering a bug on the sample. It should be IDummy.Increment and not Dumy.Increment. Thanks Mike and now I think it should compile without any problems.] In these last days I”ve been reading the C# spec and you can say that I”ve been re-discovering it :,,) If you really think about […]

Read the rest of this entry »