ref and out parameter type names

A <code>Type</code> describing a ref or out parameter has an & suffix:

 
using System;
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:

 
Boolean&
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.