C# Type MakeByRefType
Description
Type MakeByRefType
returns a Type object that represents
the current type when passed as a ref parameter (ByRef parameter in Visual
Basic).
Syntax
Type.MakeByRefType
has the following syntax.
public virtual Type MakeByRefType()
Returns
Type.MakeByRefType
method returns A Type object that represents the current type when passed as a ref parameter
(ByRef parameter in Visual Basic).
Example
The following code example creates array, ref (ByRef in Visual Basic), and pointer types for the Test class.
/*from w w w .j a v a 2 s . c o m*/
using System;
using System.Reflection;
public class Example
{
public static void Main()
{
Type t = typeof(Example).MakeArrayType();
t = typeof(Example).MakeByRefType();
Console.WriteLine("\r\nByRef Example: {0}", t);
}
}
The code above generates the following result.