C# Type IsByRef

Description

Type IsByRef gets a value indicating whether the Type is passed by reference.

Syntax

Type.IsByRef has the following syntax.


public bool IsByRef { get; }

Example

The following example demonstrates a use of the IsByRef property to check whether a specified type is passed by reference.


/*from w w w  . j av  a 2 s  .  c o m*/

using System;
using System.Reflection;

public class MainClass
{
    public static void Main()
    {
        int myInt = 0 ; 
        int[] myArray = new int[5];
        Console.WriteLine(myArray.GetType().IsByRef);
    }
}

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