Skip to content

Instantly share code, notes, and snippets.

@markrendle
Last active December 29, 2015 18:09
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 markrendle/7708809 to your computer and use it in GitHub Desktop.
Save markrendle/7708809 to your computer and use it in GitHub Desktop.
class Bobbins
{
[CallStackLocal]
public static string Value = "Foo";
public static void Write()
{
Console.WriteLine(Value);
}
}
class Program
{
static void Main()
{
Bobbins.Write(); // Foo
Bar();
Bobbins.Write(); // Foo
}
static void Bar()
{
Bobbins.Value = "Bar";
Bobbins.Write(); // Bar
Etc();
}
static void Etc()
{
Bobbins.Write(); // Bar
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment