Skip to content

Commit 25781e1

Browse files
committed
further review
1 parent 0984024 commit 25781e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/code-quality/ca1063-implement-idisposable-correctly.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The <xref:System.IDisposable?displayProperty=nameWithType> interface is not impl
3838

3939
- Dispose() is overridden.
4040

41-
- The dispose method is not public, [sealed](/dotnet/csharp/language-reference/keywords/sealed), or named Dispose.
41+
- The Dispose() method is not public, [sealed](/dotnet/csharp/language-reference/keywords/sealed), or named **Dispose**.
4242

4343
- Dispose(bool) is not protected, virtual, or unsealed.
4444

@@ -48,7 +48,7 @@ The <xref:System.IDisposable?displayProperty=nameWithType> interface is not impl
4848

4949
Violation of any one of these patterns triggers warning CA1063.
5050

51-
Every unsealed type that declares and implements the <xref:System.IDisposable> interface must provide its own protected virtual void Dispose(bool) method. Dispose() should call Dipose(true), and Finalize should call Dispose(false). If create an unsealed type that declares and implements the <xref:System.IDisposable> interface, you must define Dispose(bool) and call it. For more information, see [Clean up unmanaged resources](/dotnet/standard/garbage-collection/unmanaged) in the [.NET Framework design guidelines](/dotnet/standard/design-guidelines/index).
51+
Every unsealed type that declares and implements the <xref:System.IDisposable> interface must provide its own protected virtual void Dispose(bool) method. Dispose() should call Dipose(true), and the finalizer should call Dispose(false). If you create an unsealed type that declares and implements the <xref:System.IDisposable> interface, you must define Dispose(bool) and call it. For more information, see [Clean up unmanaged resources (.NET guide)](/dotnet/standard/garbage-collection/unmanaged) and [Dispose pattern](/dotnet/standard/design-guidelines/dispose-pattern).
5252

5353
## Rule description
5454

@@ -130,4 +130,5 @@ public class Resource : IDisposable
130130

131131
## See also
132132

133-
- [Dispose pattern (framework design guidelines)](/dotnet/standard/design-guidelines/dispose-pattern)
133+
- [Dispose pattern (framework design guidelines)](/dotnet/standard/design-guidelines/dispose-pattern)
134+
- [Clean up unmanaged resources (.NET guide)](/dotnet/standard/garbage-collection/unmanaged)

0 commit comments

Comments
 (0)