Geeks With Blogs
Tom Fischer .NET Framework
Blog moved to :

I finally decided to move to my own site:

I moved most of the blog entries to the new site.

Please update your RSS feeds.



Posted On Wednesday, August 11, 2010 3:51 PM

C# and the using Statement in 3 seconds and a bug in Reflector
Using() Statement in 3 seconds and a bug in Reflector The boring, known accross the board definition from the MSDN site: Defines a scope, outside of which an object or objects will be disposed The more interesting definition from Tom: The using() Statement generates a try{} finally{ //virtual call of the dispose method } block with null check! Let's take a deeper look. Let's write two test methods first: //Testmethod for Using public static void UsingTest() { using (SqlConnection con = new SqlConnection()) ......

Posted On Monday, September 15, 2008 4:03 PM

C# Events and Delegates in 3 seconds
C#, Events and Delegates as an Elevator Pitch - Or in 3 seconds Here are the elevator pitches you should know about events and delegates: A Delegate is a (or collection of) strongly typed FunctionPointer(s) An Event is a wrapped Delegate But to be honest this is not big news and not the reason for this blog. I thought this would make a nice starter... Like when you go for a nice dinner. Today I had the chance to look under the hood and I was astonished to see what really happens. This made me think... ......

Posted On Friday, September 12, 2008 4:35 PM

C# and the difference between out and ref
C#: The difference between out and ref. Today we had an interesting discussion about out and ref in C#. Here is a very quick elevator pitch summary: The MSDN documentation ( is very good on that and it says: "The out keyword causes arguments to be passed by reference. This is similar to the ref keyword, except that ref requires that the variable be initialized before being ......

Posted On Wednesday, September 10, 2008 11:29 AM

C# (or .NET): Primitive Types, Value Types, Reference Types and System.ValueType.
C# (or .NET): Primitive Types, Value Types, Reference Types and System.ValueType. I think this is one of the most important topics in .NET, but it is interesting to see what kind of misunderstandings are out there. Even with programmers who have used .NET for years. DISCLAIMER 1: The goal of this blog entry is not to give another in depth, all-encompasing overview - but rather a summary of the conversations I've had with people and a summary of some confusing MSDN documentation. Also I won't address ......

Posted On Thursday, September 4, 2008 2:22 PM

ToString() and the underestimated IFormattable ( IFormatPorvider, ICustomFormatter) - Why to use it!
ToString() and the underestimated IFormattable Everyone knows you always should override the ToString() function on you custom objects. But most programmers (including me until yesterday) leave it there. I ran into a problem these days where I wanted a specific xml representation and a tap separated representation of the same custom object. The "experienced" programmer would just write their own format function. But it felt more old fashion and not quite OO like. And then I read the Tip 5 in the ......

Posted On Friday, August 29, 2008 10:30 AM

Why it is time to retire the old cast operator in C#: MyType t= (MyType)o
Why it is time to retire the old cast operator in C#: MyType t= (MyType)o These days I am reading the book "Effective C#: 50 Specific Ways to improve C#" by Scott Meyers. After using C# for many years, you get into the mindset: "I know everything already". But this book really inspires me to rethink the basics I am using every day and make a step forward in sharpening my C# skills. The goal of these blog series is not to copy the book but write down my thoughts in a compressed way on certain topics. ......

Posted On Wednesday, August 27, 2008 11:27 AM

Copyright © ftom | Powered by: