SharedPropertyGroup.CreateProperty(String, Boolean) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建具有给定名称的属性。
public:
System::EnterpriseServices::SharedProperty ^ CreateProperty(System::String ^ name, [Runtime::InteropServices::Out] bool % fExists);
public System.EnterpriseServices.SharedProperty CreateProperty (string name, out bool fExists);
member this.CreateProperty : string * bool -> System.EnterpriseServices.SharedProperty
Public Function CreateProperty (name As String, ByRef fExists As Boolean) As SharedProperty
参数
- name
- String
新属性的名称。
- fExists
- Boolean
确定该属性是否存在。 如果该属性存在,则在返回时设置为 true
。
返回
请求的 SharedProperty。
示例
下面的代码示例演示如何使用 CreateProperty
方法创建共享属性。
// Create a shared property group.
SharedPropertyGroup^ group =
groupManager->CreatePropertyGroup( "Receipts", lockMode, releaseMode, groupExists );
// Create a shared property.
SharedProperty^ ReceiptNumber;
ReceiptNumber = group->CreateProperty( "ReceiptNumber", propertyExists );
// Create a shared property group.
SharedPropertyGroup group = groupManager.CreatePropertyGroup("Receipts",
ref lockMode, ref releaseMode, out groupExists);
// Create a shared property.
SharedProperty ReceiptNumber;
ReceiptNumber = group.CreateProperty("ReceiptNumber",out propertyExists);
' Create a shared property group.
Dim group As SharedPropertyGroup = groupManager.CreatePropertyGroup("Receipts", lockMode, releaseMode, groupExists)
' Create a shared property.
Dim ReceiptNumber As SharedProperty
ReceiptNumber = group.CreateProperty("ReceiptNumber", propertyExists)