Assert() private method

private Assert ( bool condition ) : void
condition bool
return void
Exemplo n.º 1
0
        /// <summary>
        /// This "assert" is executed in DEBUG and RELEASE modes. Use it in code that that won't suffer from more work (e.g. loading), not in frequently used loops
        /// </summary>
        /// <param name="condition"></param>
        public static void AssertRelease(bool condition, string assertMessage)
        {
            if (condition == false)
            {
                MyLog.Default.WriteLine("Assert: " + assertMessage);
            }

            SystemTrace.Assert(condition, assertMessage);
        }