共用方式為


ExceptionClassAttribute.Value 屬性

定義

會取得例外類別名稱,讓玩家啟動並回放訊息,然後訊息才會被導向死字母佇列。

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);
    }
}

適用於