diff --git a/Core/BkwdComp/StackTraceHiddenAttribute.cs b/Core/BkwdComp/StackTraceHiddenAttribute.cs new file mode 100644 index 00000000..4a568cb0 --- /dev/null +++ b/Core/BkwdComp/StackTraceHiddenAttribute.cs @@ -0,0 +1,13 @@ +#if !(NET6_0_OR_GREATER) +namespace System.Diagnostics; + +/// +/// Types and Methods attributed with StackTraceHidden will be omitted from the stack trace text shown in StackTrace.ToString() and Exception.StackTrace +/// +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false)] +public sealed class StackTraceHiddenAttribute : Attribute +{ + /// Initializes a new instance of the class. + public StackTraceHiddenAttribute() { } +} +#endif \ No newline at end of file