C# Type IsSecurityTransparent

Description

Type IsSecurityTransparent gets a value that indicates whether the current type is transparent at the current trust level, and therefore cannot perform critical operations.

Syntax

Type.IsSecurityTransparent has the following syntax.


public virtual bool IsSecurityTransparent { get; }

Example


//from  w w  w . j a v  a  2 s .  c  o m
using System;
namespace SystemType
{
    public class MyClass
    {
        sealed public class MyTestClass
        {
        }
        public static void Main(string []args)
        {
            try
            {
                bool myBool = false;
                MyTestClass myTestClassInstance = new MyTestClass();
                Type myType = myTestClassInstance.GetType();
                Console.WriteLine(myType.IsSecurityTransparent);
            }
            catch (Exception e)
            {
                Console.WriteLine("\nAn exception occurred: {0}",e.Message);
            }
        }
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version