Is it possible to use the BindingFlags
for methods that have attributes? I did look over msdn at BindingFlags
and nothing showed up.
This is how one of my methods looks like :
[TestMethod()
,TestCategory("ActionCol")
,TestCategory("DataDriven")
,DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", @"|DataDirectory|\ActionCol\actionCol.csv", "actionCol#csv", DataAccessMethod.Sequential)
,DeploymentItem(@"..\ActionCol\actionCol.csv")]
public void ActionCol_Insert_LeftGrid(){}
I am using reflection to add to a listbox all my void methods, but I want exclusively to add just the methods with this attribute..
This is how I am using BindingFlags
:
methArr = e.myType.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
Where methArr
is an MethodInfo
-instance