Archive

Posts Tagged ‘C#’

Defaulting on Orchard CMS

04/04/2011 8 comments

When creating a new Orchard module, I needed to set the default value for an integer. The thing is, you can’t do it in your model class like you would normally do. Property getter/setters are just getting/setting the underlying record, and the constructor runs before the record object has been created. What now?

Read more…

Dangerous .NET CLR Quirk Lurks In Unfiltered Generic Methods

03/02/2011 3 comments

Step right up! Step right up! Come inside and watch in horror as our sample C# code compiles, runs, and spectacularly fails right before your unbelieving eyes.

Read more…