SharedPropertyGroup.CreateProperty(String, Boolean) Metoda

Definicja

Tworzy właściwość o podanej nazwie.

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

Parametry

name
String

Nazwa nowej właściwości.

fExists
Boolean

Określa, czy właściwość istnieje. Ustaw wartość true na wartość po powrocie, jeśli właściwość istnieje.

Zwraca

Żądany SharedPropertyelement .

Przykłady

W poniższym przykładzie kodu pokazano, jak za pomocą CreateProperty metody utworzyć właściwość udostępnioną.

// 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)

Dotyczy