How to use a "Global Variable" in C# ? on a GUI?
-
I understand there isn't global variables in C#. So I'm attempting to use a public class with a private array to which I write to and read from in another class. The GUI is button oriented and not your standard main()... so where do I create my instance of my public class. Everywhere I put it causes it to crash my program. Is there a better way to do this. I'm reading a file. This data I read will need to be "saved" so I can output it to a graph every x time. Thanks
-
Answer:
Read http://www.blackwasp.co.uk/CSharpVariableScopes.aspx Or posts 7 and 8 in http://www.daniweb.com/forums/thread49952.html
hook 'em horns at Yahoo! Answers Visit the source
Related Q & A:
- How to print a large image in C#?Best solution by Stack Overflow
- How to Convert a C++ Structure into C# Structure?Best solution by Stack Overflow
- How to call a GOOGLE API in C#?Best solution by Stack Overflow
- How to become a good programmer in C language?Best solution by Quora
- How to insert a date variable in java?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.