MessageProperties.TryGetValue(String, Object) 方法

定義

判斷 MessageProperties 是否包含特定名稱,並且擷取其值。

public:
 virtual bool TryGetValue(System::String ^ name, [Runtime::InteropServices::Out] System::Object ^ % value);
public bool TryGetValue (string name, out object value);
abstract member TryGetValue : string * obj -> bool
override this.TryGetValue : string * obj -> bool
Public Function TryGetValue (name As String, ByRef value As Object) As Boolean

參數

name
String

要尋找之項目的名稱。

value
Object

找到之項目的值。

傳回

Boolean

如果 true 包含具有指定 MessageProperties 的項目,則為 name,否則為 false

適用於