One of my own :)
-
#if (LIBRARYFLAG)
using Product.Client;
#else
using Product.Server;
#endif
using Product.Server;To explain - we have the same services defined in Client and Server - this is using WCF. For development we set off LibraryFlag so use the services directly - without using WCF (it is faster and makes debugging easier) Of course, if you create a new service, then dont create the client service, and set LIBRARYFLAG, resharper pops up a "Press alt-enter to add the 'using'" message. I musta pressed it - so now it adds the using for the Server version. Ohh it took me a while to spot what was happening!
___________________________________________ .\\axxx (That's an 'M')
-
#if (LIBRARYFLAG)
using Product.Client;
#else
using Product.Server;
#endif
using Product.Server;To explain - we have the same services defined in Client and Server - this is using WCF. For development we set off LibraryFlag so use the services directly - without using WCF (it is faster and makes debugging easier) Of course, if you create a new service, then dont create the client service, and set LIBRARYFLAG, resharper pops up a "Press alt-enter to add the 'using'" message. I musta pressed it - so now it adds the using for the Server version. Ohh it took me a while to spot what was happening!
___________________________________________ .\\axxx (That's an 'M')
There are more
#if #endif
-related ReSharper bugs. Here is one of them which I spotted some time ago: I you'd enable generating XML documentation in your project settings, you will get warnings in every place where you didn't make documentation. So far so good. However, once upon a time I wanted to have a different description for debugging and realase builds.#if DEBUG
/// <summary>
/// Useless and unreliable sh*t, do not use this.
/// </summary>
#else
/// <summary>
/// This is a very subtle class which performs many difficult and expensive algorithms.
/// </summary>
#endif
public class Damage : OccuranceC# compiler wasn't complaing, but ReSharper wanted me to add another summary.
Greetings - Jacek Gajek