LA.NET [EN]

July, 2010Archive

Jul 21

Protected: Quote of the day

Posted in Trivia       Enter your password to view comments.

There is no excerpt because this is a protected post.

Read the rest of this entry »

Jul 21

Back to the basics: more on casting

Posted in Basics       Comments Off on Back to the basics: more on casting

I’ve already mentioned casting several times before, but I guess I’ve jumped over several basic features associated with that operation. Since this is a basics series, I should have probably explained casting instead of assuming that everyone knows how it works. So, I’ll go back and use this post to present some features associated with […]

Read the rest of this entry »

Jul 19

[Update: small update to the implicit operators code. Thanks Kevin] In a previous post, I’ve mentioned conversion operators. But what is a conversion operator? In the past, I bet that we’ve all needed to convert from one type of object to another. When we’re talking about primitive types, the CLR knows how to perform the […]

Read the rest of this entry »

Jul 15

Back to the basics: type constructors

Posted in Basics       Comments Off on Back to the basics: type constructors

After the last two posts, I guess you could see this coming, right? Today it’s all about type constructors (and it’s a long post, so make sure you’re comfy). What is a type constructor (aka, class constructor)? In C#, it’s a static and private parameterless method which is named after the class where it’s defined. […]

Read the rest of this entry »

Jul 14

Since I’ve started working in my Silverlight book, I’ve been really busy. So busy that I completely forgot to post my review about Jeffrey Richter’s CLR via C# book. Well, to be honest, there’s really not much I can say about it…let me see…basically, I want to say two things: it should be *required* reading […]

Read the rest of this entry »

Jul 14

Back to basics: structures instance constructors

Posted in Basics       Comments Off on Back to basics: structures instance constructors

In the previous post, I’ve talked about some interesting features that explain why reference type’s instance constructors behave the way they do. Today, we’ll keep looking at instance constructors, but we’ll concentrate on structs. Before going on, I’m assuming that you know the difference between value and reference types. The first thing you should keep […]

Read the rest of this entry »

Jul 12

[Update: updated the text that explains why you’d need to make an explicit call to the base class’ constructor. Thanks Damien] In the last post, I’ve mentioned constructors…but what is a constructor? The first thing you should keep in  mind is that there are several types of constructors and, in this post, we’ll only be […]

Read the rest of this entry »

Jul 12

Back to the basics: Why is my constructor not being called?

Posted in Uncategorized       Comments Off on Back to the basics: Why is my constructor not being called?

When we create a new type and define a constructor, I guess there’s nothing wrong with expecting to see that constructor called whenever a new instance of a type is created. The problem is that there are some cases where that doesn’t happen. For instance, here are two situations where your constructor won’t be called: […]

Read the rest of this entry »

Jul 09

Ok, now that the PT Silverlight book is mostly done (I’m awaiting for feedback form my reviewers – if you’re one of them and you’re reading this post, then stop right now and go back to the manuscript please! :),,), I guess it’s time to return to my blog. And I’ll be writing some posts […]

Read the rest of this entry »