Robert Westerlund

A developer's blog on code, technology
and tools in .NET and C#



Contents tagged with Magic Strings

  • "GetMemberName" or "getting rid of (some) magic strings"

    Published: 2010-11-12 17:06:03 (UTC)

    Earlier today I had another discussion() with a co-worker of mine. This discussion related to magic strings and potential ways to get rid of them. I have previously mentioned that I dislike magic strings, but I haven't mentioned why. Nor have I mentioned in which circumstances which I dislike seeing them.

    When do I use magic strings

    There are cases where magic strings are pretty useful. An example of this is in communicating between different applications, where strings are more descriptive than using, for example, an integer. Thus, if I send a message from application A t ... Read more.