Created
December 30, 2017 09:18
Star
You must be signed in to star a gist
C# 7 - Return reference - https://codingblast.com/csharp-7-return-reference-local-reference/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void PrintPoints() | |
{ | |
int points = 15; | |
ref int refToPoints = ref points; | |
refToPoints = 125; | |
Console.WriteLine($"Points: {points}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment