Skip to content

Instantly share code, notes, and snippets.

@jcotton42
Last active January 5, 2018 05:48
Show Gist options
  • Save jcotton42/c91eec183e693a6176b9d8e795fef8ef to your computer and use it in GitHub Desktop.
Save jcotton42/c91eec183e693a6176b9d8e795fef8ef to your computer and use it in GitHub Desktop.
void Main() {
var a = new[]{1,2,3};
ref int q = ref a[0];
A(ref q);
a.Dump();
}
// Define other methods and classes here
void A(ref int x) {
x = 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment