ExceptionClassAttribute.Value 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會取得例外類別名稱,讓玩家啟動並回放訊息,然後訊息才會被導向死字母佇列。
public:
property System::String ^ Value { System::String ^ get(); };
public string Value { get; }
member this.Value : string
Public ReadOnly Property Value As String
屬性值
玩家啟動並播放訊息前的例外類別名稱會被導向死字母佇列。
範例
以下程式碼範例取得Value屬性ExceptionClass屬性的值。
[ExceptionClass("ExceptionHandler")]
public class ExceptionClassAttribute_Value : ServicedComponent
{
public void ValueExample()
{
// Get the ExceptionClassAttribute applied to the class.
ExceptionClassAttribute attribute =
(ExceptionClassAttribute)Attribute.GetCustomAttribute(
this.GetType(),
typeof(ExceptionClassAttribute),
false);
// Display the value of the attribute's Value property.
Console.WriteLine("ExceptionClassAttribute.Value: {0}",
attribute.Value);
}
}