"GetMemberName" or "getting rid of (some) magic strings"
0 Comments
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.