Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Last active May 26, 2017 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiannagel/0e1fb6bdee17f02f5cbc8c417a68e82f to your computer and use it in GitHub Desktop.
Save christiannagel/0e1fb6bdee17f02f5cbc8c417a68e82f to your computer and use it in GitHub Desktop.
Allocate and use a simple array
private static void UsingSimpleArrays()
{
Console.WriteLine(nameof(UsingSimpleArrays));
for (int i = 0; i < 20; i++)
{
LocalUseOfArray(i);
}
Console.WriteLine();
Console.WriteLine();
}
private static void LocalUseOfArray(int i)
{
int[] arr = new int[ARRAYSIZE];
ShowAddress($"simple array {i}", arr);
FillTheArray(arr);
UseTheArray(arr);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment