C# TypeInfo IsMarshalByRef

Description

TypeInfo IsMarshalByRef Gets a value indicating whether the Type is marshaled by reference.

Syntax

TypeInfo.IsMarshalByRef has the following syntax.


public bool IsMarshalByRef { get; }

Example


using System;/*from  w  ww.  j  ava2  s.co  m*/
using System.Runtime.Remoting.Contexts;
public class MyContextBoundClass: ContextBoundObject
{
    public string myString = "test from java2s.com";
}
public class MyTypeDemoClass
{
    public static void Main()
    {
       Console.WriteLine ("The MarshalByRef property of {0} is {1}.", typeof(MyTypeDemoClass).Name, typeof(MyTypeDemoClass).IsMarshalByRef);
       Console.WriteLine ("The MarshalByRef property of {0} is {1}.", typeof(MyContextBoundClass).Name, typeof(MyContextBoundClass).IsMarshalByRef);

    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Reflection »




EventInfo
FieldInfo
MemberInfo
MethodInfo
ParameterInfo
TypeInfo