System.Net.ValidationHelper.IsBlankString C# (CSharp) Method

IsBlankString() public static method

public static IsBlankString ( string stringValue ) : bool
stringValue string
return bool
        public static bool IsBlankString(string stringValue) {
            return stringValue==null || stringValue.Length==0;
        }

Usage Example

        /// <devdoc>
        ///    <para>Logs Exception, restores indenting</para>
        /// </devdoc>
        internal static void Exception(TraceSource traceSource, object obj, string method, Exception e)
        {
            if (!ValidateSettings(traceSource, TraceEventType.Error))
            {
                return;
            }
            string infoLine = "Exception in the " + GetObjectName(obj) + "#" + ValidationHelper.HashString(obj) + "::" + method + " - ";

            //Trace.IndentLevel = 0;
            PrintLine(traceSource, TraceEventType.Error, 0, infoLine + e.Message);
            if (!ValidationHelper.IsBlankString(e.StackTrace))
            {
                PrintLine(traceSource, TraceEventType.Error, 0, e.StackTrace);
            }

            /*
             * if (e.InnerException != null)
             * {
             *  PrintLine(" ---- inner exception --- ");
             *  PrintLine(traceSource, TraceEventType.Error, 0, infoLine + e.InnerException.Message);
             *  PrintLine(traceSource, TraceEventType.Error, 0, infoLine + e.InnerException.Message);
             *  if (!ValidationHelper.IsBlankString(e.InnerException.StackTrace)) {
             *     PrintLine(traceSource, TraceEventType.Error, 0, e.InnerException.StackTrace);
             *  }
             *  PrintLine(" ---- End of inner exception --- ");
             * }
             */
        }
All Usage Examples Of System.Net.ValidationHelper::IsBlankString