LA.NET [EN]

January, 2007Archive

Jan 11

AJAX Library Cheat sheets

Posted in MS AJAX       Comments Off on AJAX Library Cheat sheets

My friend Paulo has pointed me to the AJAX Library cheat sheets (which are cool since they document the extensions added to the javascript objects).

Read the rest of this entry »

Jan 04

Having fun with generics – part VI

Posted in C#       Comments Off on Having fun with generics – part VI

Today we”ll focus on constraints. Constraints lets you make some assumptions about a type parameter. For instance, if you have the following interface: public interface ITest{   void Test();} You can build a new open type and say that T implements interface ITest: public class<T> where T:ITest{…} What do you gain with this approach? well, by […]

Read the rest of this entry »

Jan 03

More fun with generics – part V

Posted in C#       Comments Off on More fun with generics – part V

Here”s another generics post (yes, i know I”ve promised to start writing about WF, but the truth is that I”ve started looking at generics in depth and I want to share some of the things I”ve been learning in these last days). Today we”re going to revisit overloading (i”ve already written a post on this […]

Read the rest of this entry »

Jan 02

Having fun with generics – part IV

Posted in C#       Comments Off on Having fun with generics – part IV

Here”s another thing which you should not do (though it works): public class BaseTest<T>{  public virtual void Print<T>()  {     Console.WriteLine( typeof(T).ToString() );  }} public class Dummy{  public static void Main()  {     BaseTest<int> d = new BaseTest<int>();     d.Print<string>();  }} The problem is that you”re defining a generic method which depends on the type parameter T (note […]

Read the rest of this entry »

Jan 02

Protected: Having fun with generics – part III

Posted in C#       Comments Off on Protected: Having fun with generics – part III

There is no excerpt because this is a protected post.

Read the rest of this entry »

Jan 02

Having fun with generics – part II

Posted in Uncategorized       Comments Off on Having fun with generics – part II

This is one of those things which might really make you go mad. Ok, let”s start with a non-generic class. What will happen when you try to build a program that has this class: class Test{ public bool TestMethod(string par){ … } public bool TestMethod(string par) { … }} As you expect, you”ll get an error saying that […]

Read the rest of this entry »

Jan 02

Having fun with Generics – part I

Posted in C#       Comments Off on Having fun with Generics – part I

I think we”ve all used Generics without too much thinking in the past. In the last days, I”ve been trying to get more info about them and I”ll be posting about interesting things I”ve found during my readings and experimentations. So, do you think the following code is correct: public class Test{} public cass Test<T>{} […]

Read the rest of this entry »

Jan 01

After spending several months of 2006 studying ATLAS (oopss, I mean AJAX extensions), I”ve decided that 2007 is going to be mostly about WF. I”ve already started reading something about it and it really looks like a great platform. I think I”ll start posting about it in the next days! I”ll also be looking at […]

Read the rest of this entry »