Last active
December 29, 2015 18:09
-
-
Save ThatRendle/7708809 to your computer and use it in GitHub Desktop.
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
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