Skip to content
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
public uint id;
public float balance;

private int secret;

Check warning on line 120 in docs/csharp/programming-guide/classes-and-structs/snippets/ExtensionMembers/CustomExtensionMembers.cs

View workflow job for this annotation

GitHub Actions / snippets-build

The field 'Account.secret' is never used

Check warning on line 120 in docs/csharp/programming-guide/classes-and-structs/snippets/ExtensionMembers/CustomExtensionMembers.cs

View workflow job for this annotation

GitHub Actions / snippets-build

The field 'Account.secret' is never used
}

//<UserDefinedRef>
Expand All @@ -125,7 +125,8 @@
{
extension(ref Account account)
{
// ref keyword can also appear before the this keyword
// account is the receiver (analogous to the this parameter in extension methods).
// The ref modifier on the extension block means the receiver is passed by reference.
public void Deposit(float amount)
{
account.balance += amount;
Expand Down
Loading