ReadOnlyTagHelperAttributeList.TryGetAttribute Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.