Created
April 6, 2025 21:42
-
-
Save AnthonyGiretti/bdf6e96ae834bc7e5987cec2aa3393cf to your computer and use it in GitHub Desktop.
C# 13 params
This file contains hidden or 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
void Print(params Span<int> values) | |
{ | |
foreach (var value in values) | |
Console.WriteLine(value); | |
} | |
Span<int> span = stackalloc int[] { 10, 20, 30 }; | |
Print(span); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment