ExceptionClassAttribute クラス
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)

<AttributeUsageAttribute(AttributeTargets.Class, Inherited:=True)> _ <ComVisibleAttribute(False)> _ Public NotInheritable Class ExceptionClassAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class, Inherited=true)] [ComVisibleAttribute(false)] public sealed class ExceptionClassAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, Inherited=true)] [ComVisibleAttribute(false)] public ref class ExceptionClassAttribute sealed : public Attribute


ExceptionClassAttribute 型の使用方法のコード例を次に示します。
using System; using System.EnterpriseServices; using System.Reflection; // References: // System.EnterpriseServices [ExceptionClass("ExceptionHandler")] public class ExceptionClassAttribute_Ctor_String : ServicedComponent { } [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); } }
import System.*; import System.EnterpriseServices.*; import System.Reflection.*; // References: // System.EnterpriseServices /** @attribute ExceptionClass("ExceptionHandler") */ public class ExceptionClassAttribute_Ctor_String extends ServicedComponent { } //ExceptionClassAttribute_Ctor_String /** @attribute ExceptionClass("ExceptionHandler") */ public class ExceptionClassAttribute_Value extends ServicedComponent { public void ValueExample() { // Get the ExceptionClassAttribute applied to the class. ExceptionClassAttribute attribute = (ExceptionClassAttribute)( Attribute.GetCustomAttribute(this.GetType(), ExceptionClassAttribute.class.ToType(), false)); // Display the value of the attribute's Value property. Console.WriteLine("ExceptionClassAttribute.Value: {0}", attribute.get_Value()); } //ValueExample } //ExceptionClassAttribute_Value

System.Attribute
System.EnterpriseServices.ExceptionClassAttribute


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- ExceptionClassAttribute クラスのページへのリンク