Project.SetProperty 方法

此方法更新或创建新的属性值。

命名空间:Microsoft.Windows.Kits.Hardware.ObjectModel

程序集:Microsoft.Windows.Kits.Hardware.ObjectModel(在 Microsoft.Windows.Kits.Hardware.ObjectModel 中)

用法

Visual Basic

Dim instance As Project

Dim nameOfProperty As String

Dim propertyValue As String

Dim returnValue As String

returnValue = instance.SetProperty(nameOfProperty, propertyValue)

语法

Visual Basic

Public MustOverride Function SetProperty ( _

          nameOfProperty As String, _

          propertyValue As String _

) As String 

C#

public abstract string SetProperty (

          string nameOfProperty,

          string propertyValue

)

参数

nameOfProperty

要更新或创建的属性的名称。

propertyValue

要用于此 ProductInstance 的计算机池。

返回值

返回字符串,这是设置的属性的新值的字符串值。

备注

如果 nameOfProperty 为 null 或为空,或者 propertyValue 为 null,则会出现错误。

当项目连接到包时,不支持此方法。

线程安全

此类型的所有公共静态(在 Visual Basic 中为Shared)成员都是线程安全的。 但不保证所有实例成员都是线程安全的。