System.Reflection.RuntimeMethodInfo.ConstructName C# (CSharp) Method

ConstructName() static private method

static private ConstructName ( MethodBase mi ) : string
mi MethodBase
return string
        internal static string ConstructName(MethodBase mi)
        {
            // Serialization uses ToString to resolve MethodInfo overloads.
            string toString = null;

            toString += mi.Name;

            RuntimeMethodInfo rmi = mi as RuntimeMethodInfo;

            if (rmi != null && rmi.IsGenericMethod)
                toString += rmi.m_handle.ConstructInstantiation();

            toString += "(" + ConstructParameters(mi.GetParametersNoCopy(), mi.CallingConvention) + ")";
       
            return toString;
        }
        #endregion      

Usage Example

Esempio n. 1
0
 public override string ToString()
 {
     if (this.m_toString == null)
     {
         this.m_toString = "Void " + RuntimeMethodInfo.ConstructName(this);
     }
     return(this.m_toString);
 }