Parameter
In this chapter you will learn:
ref and out parameter type names
A Type
describing a ref or out parameter has an & suffix:
using System;/* j av a2s.c om*/
using System.Reflection;
using System.Collections.Generic;
class MainClass
{
static void Main()
{
Type t = typeof(bool).GetMethod("TryParse").GetParameters()[1].ParameterType;
Console.WriteLine(t.Name); // Boolean&
}
}
The output:
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Reflection