Delen via


Entity.GetAttributeValue-methode

Gets the value of the attribute.

Naamruimte: Microsoft.Xrm.Sdk
Assembly: Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Syntaxis

'Declaratie
Public Overridable Function GetAttributeValue(Of T) ( _
    attributeLogicalName As String _
) As T
public virtual T GetAttributeValue<T> (
    string attributeLogicalName
)

GenericParameters

  • T
    Type: Type. The type of the attribute.

Parameters

  • attributeLogicalName
    Type: Tekenreeks. The logical name of the attribute.

Retourwaarde

Type: Type
The value of the attribute.

Voorbeeld

GetAttributeValue<EntityReference>("regardingobjectid")

Opmerkingen

When an entity instance does not include the attribute specified using the attributeLogicalName parameter this method will return null rather than throw an exception. You should not assume that the entity includes the attribute. It may not be included if the code that retrieved the attribute didn’t request it. You can use Entity.Contains to check whether the entity instance includes the attribute.

Thread-veiligheid

Alle openbare statische (Shared in Visual Basic) leden van dit type zijn thread-veilig. Exemplaarleden zijn niet gegarandeerd thread-veilig.

Platforms

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Windows Server 2008,Windows Server 2012,Windows 7

Change History

Zie ook

Verwijzing

Entity-klasse
Entity-leden
Microsoft.Xrm.Sdk-naamruimte

Overige resources

Blog Post: Entity.GetAttributeValue<T> Explained

Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.