Hi All,
I have a strange "bug"
I am introspecting a class to get a list of methods and a list of attributes
applied to those methods.
When I use the following code to retrieve a list of attributes they always
come back in the order in which I put them in the code editor, except the
3rd method.
The 3rd method always returns its attribute list in reverse.
Any Ideas?
Paul
------------------------
----class to be introspected----
[WebMethod]
[SecurityAttribute("Developer")]
[PrincipalPermission(SecurityAction.Demand, Role="Developer")]
public string myDevonlyMethod()
{
return "You have Dev Roles";
Quote:
}
[WebMethod]
[SecurityAttribute("ProjectMgr,User,Developer")]
[PrincipalPermission(SecurityAction.Demand, Role="ProjectMgr")]
public string myDev_User_PrjMgr_Method()
{
return "You have All Roles";
Quote:
}
[WebMethod]
[SecurityAttribute("User")]
[PrincipalPermission(SecurityAction.Demand, Role="User")]
public string myUserOnlyMethod()
{
return "You have User Roles";
Quote:
}
[WebMethod]
[SecurityAttribute("ProjectMgr")]
[PrincipalPermission(SecurityAction.Demand, Role="ProjectMgr")]
public string myprjOnlyMethod()
{
return "You have Prj Mgr Roles";
Quote:
}
----code to introspect-------
MemberInfo info = t.GetMethod(Method);
object[] attributes = info.GetCustomAttributes(true);