Legacy C# with default method arguments

Visual Studio 2010 is officially released. Regardless of its quality, I think that a very large percentage of companies will move from 2008 to 2010 very, very slowly. If you are a software developer “doing” C# in some of this companies, You might find this post useful.

Furthermore, there are more and more nice and useful C# samples to be found, which are in the same time presented using C#4 and VS2010. Most of that “new” code can be re-factored “back” into legacy C#. Currently, I am reluctant to invest in VS2010, so this is my solution for re-factoring C#4 methods using default arguments, back into “legacy” C#.
Continue reading “Legacy C# with default method arguments”

C# implicit casting

DBJ dreaming in C# while lying on green grass
DBJ dreaming in C# while lying on green grass

February 13th, 2008

There might be something very interesting for you in FM#. Maybe a interesting example of the usage, of C# implicit casting operator? … Wait, what is FM#?

FM# is (my) C# library of Foundation Mechanisms (aka FM).

For a start, let me offer some magic. Lets look in the method cast() of the util class.  This method is used to get the value from the xml node, and cast it implicitly, to the C# variable of the same type. Reminder: value of the xml node is always an string.  Confusing. Let’s just use this then. Here is the method footprint:
Continue reading “C# implicit casting”