PERWAPI.ClassRef.AddMethod C# (CSharp) Méthode

AddMethod() public méthode

Add a method to this class
public AddMethod ( string name, GenericParam genPars, Type retType, Type pars ) : MethodRef
name string method name
genPars GenericParam generic parameters
retType Type return type
pars Type parameter types
Résultat MethodRef
        public MethodRef AddMethod(string name, GenericParam[] genPars, Type retType, Type[] pars)
        {
            MethodRef 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;
        }

Same methods

ClassRef::AddMethod ( string name, Type retType, Type pars ) : MethodRef
ClassRef::AddMethod ( MethodRef meth ) : void

Usage Example

        internal static MethodRef AddStaticMethod(ClassRef classRef, string name, PERWAPI.Type retType, PERWAPI.Type[] args)
        {
            MethodRef method = classRef.GetMethod(name, args);

            if (method == null)
                method = classRef.AddMethod(name, retType, args);
            
            return method;
        }
All Usage Examples Of PERWAPI.ClassRef::AddMethod