Skip to content

Commit 560697e

Browse files
committed
reset ObsoleteAttribute
1 parent ffb9b6e commit 560697e

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

xml/System/ObsoleteAttribute.xml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,18 @@
6969
</Attribute>
7070
</Attributes>
7171
<Docs>
72-
<summary>
73-
Marks program elements that are no longer in use.
74-
</summary>
72+
<summary>Marks the program elements that are no longer in use. This class cannot be inherited.</summary>
7573
<remarks>
76-
Source code imported from
77-
<see href="https://github.com/dotnet/runtime/blob/5535e31a712343a63f5d7d796cd874e563e5ac14/src/libraries/System.Private.CoreLib/src/System/ObsoleteAttribute.cs">
78-
ObsoleteAttribute.cs</see> without any changes, all resulting warnings ignored accordingly.
79-
</remarks>
74+
<format type="text/markdown"><![CDATA[
75+
<xref:System.ObsoleteAttribute> is applicable to all program elements except assemblies, modules, parameters, and return values. Marking an element as obsolete informs users that the element may be removed in a future version of the product.
76+
77+
The string assigned to the <xref:System.ObsoleteAttribute.Message> property is emitted by the compiler when the attribute target is used in code. Ideally, the string should provide some workaround or programmatic alternative.
78+
79+
Use the <xref:System.ObsoleteAttribute.IsError> property to indicate to the compiler whether using the <xref:System.ObsoleteAttribute> attribute should cause it to emit an error (<xref:System.ObsoleteAttribute.IsError%2A> is `true`) or a warning (<xref:System.ObsoleteAttribute.IsError%2A> is `false`).
80+
81+
For more information about using attributes, see [Attributes](/dotnet/standard/attributes/).
82+
]]></format>
83+
</remarks>
8084
<example>
8185
<format type="text/markdown"><![CDATA[
8286
The following example defines a class that contains a property and a method that are marked with the <xref:System.ObsoleteAttribute> attribute. Accessing the value of the `OldProperty` property in code generates a compiler warning, but calling the `CallOldMethod` method generates a compiler error. The example also shows the output that results when you attempt to compile the source code.

0 commit comments

Comments
 (0)