Forum Discussion

amarr1143l's avatar
amarr1143l
Contributor
11 years ago

Specify multiple BindingFlags in GetMethods_2

Hi, I am trying to specify multiple constraints on BindingFlags of GetMethods_2 method. In c#, multiple BindingFlags are separated using "|" character. However, in TC when I try to do th...
  • HKosova's avatar
    11 years ago
    Hi Amar,



    You can create a set of flags using Enum.Parse:

    Set objEnumType = dotNET.System_Reflection.BindingFlags.Public.GetType

    Set objFlags = dotNET.System.Enum.Parse(objEnumType, "Public,Instance,DeclaredOnly")



    Set objMethods = objClass.GetMethods_2(objFlags)