src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Add a method to this class
/// </summary>
/// <param name="name">method name</param>
/// <param name="genPars">generic parameters</param>
/// <param name="retType">return type</param>
/// <param name="pars">parameters</param>
/// <returns>a descriptor for this new method</returns>
Add a method to this class
Add a method to this class
public MethodDef AddMethod(string name, GenericParam[] genPars, Type retType, Param[] pars) {
            MethodDef meth = AddMethod(name,retType,pars);
            if ((genPars != null) && (genPars.Length > 0)) {
                for (int i=0; i < genPars.Length; i++) {
                    genPars[i].SetMethParam(meth,i);
                }
                meth.SetGenericParams(genPars);
            }
            return meth;
        }
public MethodDef AddMethod ( string name , GenericParam [ ] genPars , Type retType , Param [ ] pars ) { MethodDef meth = AddMethod ( name , retType , pars ) ; if ( ( genPars != null ) && ( genPars . Length > 0 ) ) { for ( int i = 0 ; i < genPars . Length ; i ++ ) { genPars [ i ] . SetMethParam ( meth , i ) ; } meth . SetGenericParams ( genPars ) ; } return meth ; }
Add a method to this class
Add a method to this class
a descriptor for this new method
a descriptor for this new method
name
string
None
genPars
GenericParam[]
None
retType
Type
None
pars
Param[]
None