Parameter

In this chapter you will learn:

  1. ref and out parameter type names

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:

  1. Call constructor
  2. Get/set property using invoke member
  3. Reflecting and Activating Types
Home » C# Tutorial » Reflection
Reflection
Type
Type properties
Field reflection
Field Type
Field Attributes
FieldHandle
Field value
Set Field value
delegate reflection
Event reflection
Indexer reflection
Properties Reflection
Method
Parameter
Invoke
Type Instantiating
interface reflection
Generic type reflection
Reflection on nested Types
Subtype
Array reflection
Assembly