Search code examples
c#debuggingresourcesrelease

Is it wasteful to place Debug.Writeline text in a resource file?


I have the following:

Debug.Writeline(Properties.Resources.DEBUG_MSG_1);

This works fine, and I can't imagine it hurting me in any way, shape, or form when compiling in Debug mode. However, I worry that although this is a nice and convenient way to manage my messages, it might be unnecessary overhead to include extra useless items in a resource file when I compile in Release. Is my assumption correct?


Solution

  • Well... Resources are embedded to application. So in RELEASE you'll have some extra messages, which would not be used. The more you have them, the more will your application weights.

    But I think that real problem might be someone reading DEBUG messages while she/he isn't supposed to do.