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.