When we don't know the attribute type we cannot use Attribute.IsAttribute. Use this instead.
View code on GitHub Namespace: DeltaEngine.ExtensionsAssembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
public static bool HasAttribute(
this StackFrame frame,
string name
)
public static bool HasAttribute(
this StackFrame frame,
string name
)
<ExtensionAttribute>
Public Shared Function HasAttribute (
frame As StackFrame,
name As String
) As Boolean
<ExtensionAttribute>
Public Shared Function HasAttribute (
frame As StackFrame,
name As String
) As Boolean
public:
[ExtensionAttribute]
static bool HasAttribute(
StackFrame^ frame,
String^ name
)
public:
[ExtensionAttribute]
static bool HasAttribute(
StackFrame^ frame,
String^ name
)
static member HasAttribute :
frame : StackFrame *
name : string -> bool
static member HasAttribute :
frame : StackFrame *
name : string -> bool
Return Value
Type:
BooleanUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
StackFrame. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).