共用方式為


DataContractBase.SetProperty<T> 方法

此 API 支援 SQL Server 2012 基礎結構,但無法直接從您的程式碼使用。

Sets the property using the specified values.

命名空間:  Microsoft.MasterDataServices.Services.DataContracts
組件:  Microsoft.MasterDataServices.Services.Contracts (在 Microsoft.MasterDataServices.Services.Contracts.dll 中)

語法

'宣告
Protected Function SetProperty(Of T) ( _
    ByRef propertyBackingField As T, _
    newValue As T, _
    propertyName As String, _
    emptyStringIsNull As Boolean _
) As Boolean
'用途
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 不支援一般類型和方法。

型別參數

  • T
    The property type.

參數

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

傳回值

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

請參閱

參考

DataContractBase 類別

Microsoft.MasterDataServices.Services.DataContracts 命名空間