Skip to content
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
69f41a8
Update access-modifiers.md
bigboybamo Jun 11, 2024
b0e8850
Merge branch 'dotnet:main' into main
bigboybamo Jul 2, 2024
9afec84
Merge branch 'dotnet:main' into main
bigboybamo Aug 14, 2024
52abccd
Merge branch 'dotnet:main' into main
bigboybamo Aug 14, 2024
1706ff9
Merge branch 'dotnet:main' into main
bigboybamo Oct 1, 2024
8f859cb
Merge branch 'dotnet:main' into main
bigboybamo Oct 7, 2024
b638380
Merge branch 'dotnet:main' into main
bigboybamo Oct 10, 2024
f2a5570
Merge branch 'dotnet:main' into main
bigboybamo Nov 18, 2024
64c4bf8
Merge branch 'dotnet:main' into main
bigboybamo Dec 12, 2024
f66fddb
Merge branch 'dotnet:main' into main
bigboybamo Mar 11, 2025
78d4328
Merge branch 'dotnet:main' into main
bigboybamo Mar 21, 2025
ff4942a
Merge branch 'dotnet:main' into main
bigboybamo Mar 22, 2025
3042dbd
Merge branch 'dotnet:main' into main
bigboybamo Apr 5, 2025
bde738f
Merge branch 'dotnet:main' into main
bigboybamo Jun 9, 2025
9959d7a
Merge branch 'dotnet:main' into main
bigboybamo Jun 9, 2025
8ba2760
Merge branch 'dotnet:main' into main
bigboybamo Jul 2, 2025
995a0ec
Merge branch 'dotnet:main' into main
bigboybamo Jul 8, 2025
a9d399e
Merge branch 'dotnet:main' into main
bigboybamo Jul 31, 2025
68e5219
Merge branch 'dotnet:main' into main
bigboybamo Aug 21, 2025
a72eede
Merge branch 'dotnet:main' into main
bigboybamo Sep 25, 2025
7cd0684
Merge branch 'dotnet:main' into main
bigboybamo Oct 4, 2025
e1545bb
Merge branch 'dotnet:main' into main
bigboybamo Oct 8, 2025
8084fd9
Update using.md
bigboybamo Oct 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/csharp/language-reference/statements/using.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ When you declare several instances in one `using` statement, they are disposed i

You can also use the `using` statement and declaration with an instance of a [ref struct](../builtin-types/ref-struct.md) that fits the disposable pattern. That is, it has an instance `Dispose` method that's accessible, parameterless, and has a `void` return type.

A `return` inside a `using` block still guarantees disposal, the compiler rewrites it into a `try/finally`, so the resource’s `Dispose` is always called before the method actually returns.

The `using` statement can also be of the following form:

```csharp
Expand Down
Loading