Partager via


EnterpriseManagementObjectBaseWithProperties.TryGetProperty Method (ManagementPackProperty, EnterpriseManagementSimpleObject)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets a property value if one exists.

Namespace: Microsoft.EnterpriseManagement.Common
Assembly: Microsoft.EnterpriseManagement.Core (in Microsoft.EnterpriseManagement.Core.dll)

Usage

'Usage
Dim instance As EnterpriseManagementObjectBaseWithProperties
Dim property As ManagementPackProperty
Dim simpleObject As EnterpriseManagementSimpleObject
Dim returnValue As Boolean

returnValue = instance.TryGetProperty(property, simpleObject)

Syntax

'Declaration
Public Function TryGetProperty ( _
    property As ManagementPackProperty, _
    <OutAttribute> ByRef simpleObject As EnterpriseManagementSimpleObject _
) As Boolean
public bool TryGetProperty (
    ManagementPackProperty property,
    out EnterpriseManagementSimpleObject simpleObject
)
public:
bool TryGetProperty (
    ManagementPackProperty^ property, 
    [OutAttribute] EnterpriseManagementSimpleObject^% simpleObject
)
public boolean TryGetProperty (
    ManagementPackProperty property, 
    /** @attribute OutAttribute() */ /** @ref */ EnterpriseManagementSimpleObject simpleObject
)

Parameters

  • property
    The property to search for.
  • simpleObject
    When this method returns, it contains the property value. This parameter is passed uninitialized.

Return Value

true if the property was found and returned; otherwise, false.

Exceptions

Exception type Condition
ArgumentNullException

The property parameter is a null reference (Nothing in Visual Basic).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Vista, Windows Server 2003, and

Target Platforms

Windows Server 2008,Windows Server 2003

See Also

Reference

EnterpriseManagementObjectBaseWithProperties Class
EnterpriseManagementObjectBaseWithProperties Members
Microsoft.EnterpriseManagement.Common Namespace