Tag Archives: csharp

Using Quartz.NET, Spring.NET and NHibernate to run Scheduled Tasks in ASP.NET

Running scheduled tasks in web applications is not normally a straightforward thing to do. Web applications are built to respond to requests from users and respond to that request. This request/response lifecycle doesn’t always match well to a long running … Continue reading

Posted in .NET, Web | Tagged , , , , | 8 Comments

StringBuilder and my Biggest Pet Peeve

What You Should Know About Strings In both Java and .NET (and other languages) String objects are immutable. They don’t change. Period. If you “change” a String, it creates a new String. That includes String concatenation using a + // … Continue reading

Posted in Code | Tagged , | 5 Comments

Register and Unregister COM DLL from .NET Code

Background The command regsvr32 is used to register a native, unmanaged code DLL so that it is available via COM. With a registered DLL you can use COM Interop to call that code from .NET Managed code. Regsvr32 is unmanaged … Continue reading

Posted in .NET, Code | Tagged , | 4 Comments

Database Migrations for .NET

One of the more difficult things to manage in software projects is often changing a database schema over time. On the projects that I work on, we don’t usually have DBAs who manage the schema so it is left up … Continue reading

Posted in .NET, Automation, Code | Tagged , , | 5 Comments

Implementing Mixins with C# Extension Methods

Wikipedia defines a mixin as “a class that provides a certain functionality to be inherited by a subclass, but is not meant to stand alone. Inheriting from a mixin is not a form of specialization but is rather a means … Continue reading

Posted in .NET, Code | Tagged , , , | 6 Comments

ObjectBuilder Can Inject to UserControls As Well

This is a followup to my previous post on integrating ObjectBuilder and ASP.NET. As I was playing around with the solution I hit on the fact that I was only injecting at the Page level. As ASP.NET is a component … Continue reading

Posted in .NET | Tagged , , , | Leave a comment

Integrating ObjectBuilder with ASP.NET

ObjectBuilder is a .NET framework made for building Inversion of Control or Dependency Injection containers. Unlike Spring or Pico, ObjectBuilder is not a full DI framework, instead it’s a framework for building DI solutions. Yes, that’s incredibly weird to me … Continue reading

Posted in .NET, Web | Tagged , , , | 1 Comment

Mocking .NET Objects with NUnit

NUnit is my Unit Testing tool of choice for .NET development. Microsoft provides a unit testing framework but it only works with some higher-end versions of Visual Studio. They’re so similar that it’s almost ridiculous that Microsoft created their own … Continue reading

Posted in .NET, Code, Unit Testing | Tagged , , , | 30 Comments

More .NET Compact Framework Woes

I posted previously on a Bug in the .NET Compact Framework with the XmlEnum Attribute with whitespace in the name. Well I’ve run into some other interesting “features”. The first thing to realize is that the things that work on … Continue reading

Posted in .NET | Tagged , | 5 Comments

.NET Makes Me Mad (Generics and Collections edition)

Ok, so I’ve decided I need to rant a little bit about .NET. This ends up in part being, “What I like about Java that I don’t like about C#”. I think this is fair though. It’s not like C# … Continue reading

Posted in .NET | Tagged , | 2 Comments