Udostępnij za pośrednictwem


SerializationMessage.AddProperty(String, Object) Method

Definition

Add additional properties to the message.

public:
 void AddProperty(System::String ^ propertyName, System::Object ^ propertyValue);
public void AddProperty (string propertyName, object propertyValue);
member this.AddProperty : string * obj -> unit
Public Sub AddProperty (propertyName As String, propertyValue As Object)

Parameters

propertyName
String

Name of the property to add. It is used as the key to store and retrieve the value, so must be non-empty.

propertyValue
Object

Value of the property to add. Can be any value, including null.

Remarks

The given property name is used as the key to store and retrieve the property value. It is compared by ordinal, and if it collapse with an existing property name, the new value will replace the existing value (no error will be given in this case).

Applies to