public CDMethod getMethodByName(String MethodName) { CDMethod Result = null; foreach (CDMethod Method in this.Methods) { if (Method.Name.Equals(MethodName)) { Result = Method; break; } } return(Result); }
public Boolean AddMethod(CDMethod NewMethod) { Boolean Result = true; foreach (CDMethod Method in this.Methods) { if (Method.Name == NewMethod.Name) { Result = false; break; } } if (Result) { this.Methods.Add(NewMethod); } return(Result); }