Returns the attribute with the given ID and natural language.
| C# | Visual Basic |
public ServiceAttribute GetAttributeById( ServiceAttributeId id, LanguageBaseItem language )
Public Function GetAttributeById ( _ id As ServiceAttributeId, _ language As LanguageBaseItem _ ) As ServiceAttribute
- id (ServiceAttributeId)
- The id of the service attribute to locate, as a ServiceAttributeId.
- language (LanguageBaseItem)
- Which multi-language version of the string attribute to locate.
A ServiceAttribute holding
the attribute with the specified ID and language.
Is never nullNothingnullptr.
| Exception | Condition |
|---|---|
| KeyNotFoundException |
There is no attribute with the given Id with the given language base in the record.
|