Ejemplo n.º 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());
            }
        }
Ejemplo n.º 2
0
        public override string ToString()
        {
            bool flag = false;

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