Escape() public static method

public static Escape ( string str ) : string
str string
return string
Example #1
0
        public override SecurityElement ToXml()
        {
            SecurityElement esd = CodeAccessPermission.CreatePermissionElement(this, "System.Security.Permissions.EnvironmentPermission");

            if (!IsUnrestricted())
            {
                if (this.m_read != null && !this.m_read.IsEmpty())
                {
                    esd.AddAttribute("Read", SecurityElement.Escape(m_read.ToString()));
                }
                if (this.m_write != null && !this.m_write.IsEmpty())
                {
                    esd.AddAttribute("Write", SecurityElement.Escape(m_write.ToString()));
                }
            }
            else
            {
                esd.AddAttribute("Unrestricted", "true");
            }
            return(esd);
        }