GetAttribute(String, TAttributeType) Method

Definition

Namespace Svg
Assembly Svg.Custom.dll

Gets the attribute with the specified name.

public TAttributeType GetAttribute<TAttributeType>(string attributeName, TAttributeType defaultValue = null)

Type parameters

TAttributeType
The type of the attribute value.

Parameters

attributeName
String?

A String? containing the name of the attribute.

defaultValue
{TAttributeType}

The value to return if a value hasn't already been specified.

Returns

{TAttributeType}
The attribute value if available; otherwise the default value of TAttributeType.