Use C# If Debug


Use C# If Debug



using Hero.Core.Configuration;

namespace Hero.ReleaseManagement

{/// <summary>
/// Environment helper methods
/// </summary>
public static class EnvironmentHelper
{/// <summary>
/// Determines whether [is debug mode].
/// Use this method instead of DEBUG element at Visual Studio
/// </summary>
/// <returns></returns>
public static bool IsInDebugMode
{
get { return ConfigurationManager.HasFeature("ReleaseManagement.DebugMode"); }
}

}

}


if (!EnvironmentHelper.IsInDebugMode)
{
 ----
}

Yorumlar