Skip to content

Commit 8dcd395

Browse files
Ryan Stellysharwell
andauthored
replace "dummy" with more inclusive language (#21527)
* replace "dummy" with more inclusive language https://developers.google.com/style/inclusive-documentation#ableist-language * remove redundant "temporary" descriptor Co-authored-by: Sam Harwell <[email protected]> Co-authored-by: Sam Harwell <[email protected]>
1 parent 473c01c commit 8dcd395

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/discards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.date: 09/22/2020
66
---
77
# Discards - C# Guide
88

9-
Starting with C# 7.0, C# supports discards, which are temporary, dummy variables that are intentionally unused in application code. Discards are equivalent to unassigned variables; they do not have a value. Because there is only a single discard variable, and that variable may not even be allocated storage, discards can reduce memory allocations. Because they make the intent of your code clear, they enhance its readability and maintainability.
9+
Starting with C# 7.0, C# supports discards, which are placeholder variables that are intentionally unused in application code. Discards are equivalent to unassigned variables; they do not have a value. Because there is only a single discard variable, and that variable may not even be allocated storage, discards can reduce memory allocations. Because they make the intent of your code clear, they enhance its readability and maintainability.
1010

1111
You indicate that a variable is a discard by assigning it the underscore (`_`) as its name. For example, the following method call returns a 3-tuple in which the first and second values are discards and *area* is a previously declared variable to be set to the corresponding third component returned by *GetCityInformation*:
1212

0 commit comments

Comments
 (0)