CSharp

My new favorite C# language feature: [CallerMemberName]

SneWs's picture

With the release of Visual Studio 2012 and C# 4.5, [CallerMemberName] makes its entrance. With this new awesome feature you can write INotifyPropertyChanged code without having to worry about renaming properties and keeping strings in sync for the call to OnPropertyChanged(…).

Are you using Canary tests for complex test?

SneWs's picture

If not, you should, and here is why, Canary tests is an internal test of your test setup and should be used when you have a complex setup method. The Canary is a internal test of your test setup.

A great example of when a Canary tests should be used, you have some sort of dependency injection with configuration files, and after refactoring you might have changed some names etc invalidating your wiring configuration.

Here is a quick example in C# using MSTest:

ASP.NET MVC

SneWs's picture

I started to use ASP.NET MVC, and I have to say, it's incredibly easy to learn and use. Development time is cut with at least 30-40% and I can spend more time on implementing the business logic and data access.Routing is another thing that have been improved, instead of using pure query strings, you build routes. This enables you to build clean URLs in a very simple way. As a ex. you would write a link as /Blog/Edit/4232 instead of /Blog/Edit.aspx?id=4232.
You had the capability to do routing before MVC, but MVC simplifies it alot.

openSUSE and Apache with Mono 2.0

SneWs's picture

So, I started to try to port some of my Web services running on IIS and Windows server to Linux (openSuSE). The first problem that occurred was that mod_mono is running with version 1.1 as default, nothing strange with that, but I need support for 2.0+
So, what to do you might ask, and here is the solution that got me up and running for a quick and dirty test. It's not a optimal config, but it's good enough for testing.

Subscribe to RSS - CSharp
© 2008 - 2012 Marcus Grenängen. Drupal theme by Kiwi Themes.