Reputation: 3058
In the application I am creating, I am hooking an "Editor" up directly to the app. However, the editor acts as an external program, poking at the app.
Some of the accessors and mutators the editor will use will most definitely not be used in the app itself, and shouldn't ever be used!
Since I work on a team, I want to "Block Out" certain function and classes entirely when running in non-editor builds.
In C++, I could do something like this:
#if !defined(_DISTRIBUTION)
void SetUniqueID(int inID) { mID = inID; }
#endif
When the above code is used in debug or editor builds, it is called fine. When used in release builds, the compiler or game will fail.
What is the C# equivalent to this?
Upvotes: 1
Views: 95
Reputation: 11403
#if DEBUG
Console.WriteLine("Mode=Debug");
#else
Console.WriteLine("Mode=Release");
#endif
Upvotes: 1