Global variables or class throughout the application
-
Hello experts, How can I manage global variables through out the application in C#.Net...?
Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...
-
Hello experts, How can I manage global variables through out the application in C#.Net...?
Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...
Use a static class. For instance:
public static class MyClass { public string MyKey = string.Empty; }
To refer to it in other places, you would use
MyClass.MyKey = "Hello";
Deja View - the feeling that you've seen this post before.
-
Hello experts, How can I manage global variables through out the application in C#.Net...?
Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...
Create a public class named like Global and make some public static property and access it in application anywhere
Parwej Ahamad g.parwez@gmail.com