ReadOnlyTagHelperAttributeList.TryGetAttribute Method

Definition

Retrieves the first TagHelperAttribute with Name matching name.

public:
 bool TryGetAttribute(System::String ^ name, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Razor::TagHelpers::TagHelperAttribute ^ % attribute);
public bool TryGetAttribute (string name, out Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute);
member this.TryGetAttribute : string * TagHelperAttribute -> bool
Public Function TryGetAttribute (name As String, ByRef attribute As TagHelperAttribute) As Boolean

Parameters

name
String

The Name of the TagHelperAttribute to get.

attribute
TagHelperAttribute

When this method returns, the first TagHelperAttribute with Name matching name, if found; otherwise, null.

Returns

true if a TagHelperAttribute with the same Name exists in the collection; otherwise, false.

Remarks

name is compared case-insensitively.

Applies to