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).
Ramblings about C#, .NET and Programming
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).
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 […]
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 […]
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 […]
There is no excerpt because this is a protected post.
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 […]
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>{} […]
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 […]