Condividi tramite


SharedPropertyGroup.CreateProperty(String, Boolean) Metodo

Definizione

Consente di creare una proprietà con il nome specificato.

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

Parametri

name
String

Nome della nuova proprietà.

fExists
Boolean

Determina l'esistenza o meno della proprietà. Se la proprietà esiste, è impostato su true alla restituzione.

Restituisce

Oggetto SharedProperty richiesto.

Esempio

Nell'esempio di codice seguente viene illustrato come usare il CreateProperty metodo per creare una proprietà condivisa.

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

Si applica a