Beispiel #1
0
        /// <include file='doc\Message.uex' path='docs/doc[@for="Message.ToString"]/*' />
        /// <internalonly/>
        /// <devdoc>
        /// </devdoc>
        public override string ToString()
        {
            // Link Demand on System.Windows.Forms.Message
            // fails to protect overriden methods.
            bool unrestricted = false;

            try
            {
                IntSecurity.UnmanagedCode.Demand();
                unrestricted = true;
            }
            catch (SecurityException)
            {
                // eat the exception.
            }

            if (unrestricted)
            {
                return(MessageDecoder.ToString(this));
            }
            else
            {
                return(base.ToString());
            }
        }
        public override string ToString()
        {
            bool flag = false;

            try
            {
                IntSecurity.UnmanagedCode.Demand();
                flag = true;
            }
            catch (SecurityException)
            {
            }
            if (flag)
            {
                return(MessageDecoder.ToString(this));
            }
            return(base.ToString());
        }
Beispiel #3
0
 public override string ToString() => MessageDecoder.ToString(this);
Beispiel #4
0
 /// <include file='doc\Message.uex' path='docs/doc[@for="Message.ToString"]/*' />
 /// <internalonly/>
 /// <devdoc>
 /// </devdoc>
 public override string ToString()
 {
     return(MessageDecoder.ToString(this));
 }