我正在尝试确定界面是否使用特定属性进行修饰.例如,我有以下界面:
<MyCustomAttribute()> _ Public Interface IMyInterface Function Function1 Sub DeleteWorkflowInstanceMap(ByVal instanceId As Guid) Sub InsertWorkflowInstanceMap(ByVal instanceId As Guid,ByVal aliasName As String) End Interface
如何确定IMyInterface是否使用MyCustomAttribute属性进行修饰?
甚至比GetCustomAttributes更好的是Shared方法IsDefined:
Attribute.IsDefined(GetType(IMyInterface),GetType(MyCustomAttribute))