Created
May 12, 2023 16:21
-
-
Save kleinron/6d197caff02801d34b4821975eef155d to your computer and use it in GitHub Desktop.
This file contains 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 Application_Start(object sender, EventArgs e) | |
{ | |
MyGlobals.Wish.Value = 1234; | |
MyGlobals.Wall.Value = "numb"; | |
} |
This file contains 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
public class MyGlobals | |
{ | |
public static SafeValueSeldomWrites<int> Wish = | |
new SafeValueSeldomWrites<int>(); | |
public static SafeValueSeldomWrites<string> Wall = | |
new SafeValueSeldomWrites<string>(); | |
} |
This file contains 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
public partial class MyPage : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
// get a value | |
int diamond = (int) Application["Wish"]; | |
// set a value | |
Application["Wall"] = "numb"; | |
} | |
} |
This file contains 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
protected void Page_Load(object sender, EventArgs e) | |
{ | |
// get a value | |
int diamond = MyGlobals.Wish.Value; | |
// set a value | |
MyGlobals.Wall.Value = "Vera"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment