src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Add a method to this class
/// </summary>
/// <param name="name">method name</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, Type retType, Param[] pars) {
            System.Diagnostics.Debug.Assert(retType != null);
            MethSig mSig = new MethSig(name);
            mSig.SetParTypes(pars);
            MethodDef meth = (MethodDef)GetMethod(mSig);
            if (meth != null)
                throw new DescriptorException("Method " + meth.NameString());
            mSig.retType = retType;
            meth = new MethodDef(this,mSig,pars);
            methods.Add(meth);
            return meth;
        }
public MethodDef AddMethod ( string name , Type retType , Param [ ] pars ) { System . Diagnostics . Debug . Assert ( retType != null ) ; MethSig mSig = new MethSig ( name ) ; mSig . SetParTypes ( pars ) ; MethodDef meth = ( MethodDef ) GetMethod ( mSig ) ; if ( meth != null ) throw new DescriptorException ( " " + meth . NameString ( ) ) ; mSig . retType = retType ; meth = new MethodDef ( this , mSig , pars ) ; methods . Add ( meth ) ; 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
retType
Type
None
pars
Param[]
None