Share via


DataContractBase.SetProperty<T> Method

This API supports the SQL Server 2012 infrastructure and is not intended to be used directly from your code.

Sets the property using the specified values.

Namespace:  Microsoft.MasterDataServices.Services.DataContracts
Assembly:  Microsoft.MasterDataServices.Services.Contracts (in Microsoft.MasterDataServices.Services.Contracts.dll)

Syntax

'Declaration
Protected Function SetProperty(Of T) ( _
    ByRef propertyBackingField As T, _
    newValue As T, _
    propertyName As String, _
    emptyStringIsNull As Boolean _
) As Boolean
'Usage
Dim propertyBackingField As T
Dim newValue As T
Dim propertyName As String 
Dim emptyStringIsNull As Boolean 
Dim returnValue As Boolean 

returnValue = Me.SetProperty(propertyBackingField, _
    newValue, propertyName, emptyStringIsNull)
protected bool SetProperty<T>(
    ref T propertyBackingField,
    T newValue,
    string propertyName,
    bool emptyStringIsNull
)
protected:
generic<typename T>
bool SetProperty(
    T% propertyBackingField, 
    T newValue, 
    String^ propertyName, 
    bool emptyStringIsNull
)
member SetProperty : 
        propertyBackingField:'T byref * 
        newValue:'T * 
        propertyName:string * 
        emptyStringIsNull:bool -> bool
JScript does not support generic types and methods.

Type Parameters

  • T
    The property type.

Parameters

  • propertyBackingField
    Type: T%
    The backing field of the property to change.
  • newValue
    Type: T
    The new value to give to the property.
  • emptyStringIsNull
    Type: System.Boolean
    true to indicate that the empty string is null; otherwise, false.

Return Value

Type: System.Boolean
true if the property was set; otherwise, false.

See Also

Reference

DataContractBase Class

Microsoft.MasterDataServices.Services.DataContracts Namespace