I do a fair amount of GDI+ programming, and thus using a lot of IDisposable objects. But I also use template or factory methods alot in my apps, and that doesnt work well with disposable objects Imagine something like this: public abstract class MyRendererBase { public void Render(Graphics g) { //use templated objects Brush bgBrush = GetBackgroundBrush();…More
Category Archives: .NET
Caramel – Screenshots
For those who havent read my earlier posts: Caramel is a hybrid between old school code generators and Entity Mapping tool. You can also plug in your own node types in the meta tree, and thus allowing you to generate pretty much whatever you want. My intention is to release it with built in support…More
Caramel – Code Generator
As some of you might know, I’ve been working on a class designer (Albino horse) off and on for a while now. I’ve also started to work on a code generator where the class designer will be used. The code generator will be a sort of hybrid between old school DB code generator and Puzzle ObjectMapper.…More
Linq to objects for .NET 2 available
Patrik Löwendahl blogged about using C#3 features in .NET 2 via VS.NET 2008 a few days ago: http://www.lowendahl.net/showShout.aspx?id=191 There are quite a few of the new features that works straight out of the box. However, Linq does not, alot of the code that Linq uses is simply not present in the .NET 2 BCL. So,…More
Hidden gem: BuildManager.GetType
I’ve been digging through the ObjectDataSource today and I was trying to figure out how they created the datasource instance from the type name. Now some clever reader might say “I know, I know, Type.GetType(string)”… But that’s wrong.. Type.GetType(string) requires full type names with assembly name and the whole shebang. The ObjectDataSource is able to…More