DCSIMG
Silverlight,stringof - Arik Poznanski's Blog

Arik Poznanski's Blog

It CAN be done with .NET

News

MVP

MCC

CodeProject MVP

MCPD

MCTS

Subscribe to my blog by email

Arik Poznanski LinkedIn Profile

Email: arik.com at gmail dot com
or, use this form

Locations of visitors to this page


Sela Group

Sela Canada

DZone MVB

Links

Official Blogs

WPF / SL Blogs

Developers Blogs

Browse by Tags

All Tags » Silverlight » stringof (RSS)
No More Magic Strings! Presenting: @string.of
The Problem How many times have you seen the following code snippets? 1. Checking method parameters if (executeMethod == null ) { throw new ArgumentNullException ( "executeMethod" ); } 2. Implementing a property in a WPF / SL view-model public double Size { get { return _size; } set { _size = value ; RaisePropertyChanged( "Size" ); } } The first time I had to wrote code like this I felt uneasy. Hardcoded strings are bad practice and should be rarely used. Even worse, using a hardcoded...