Global access to arrays

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I am a beginner at C# and am probably trying to run before I can walk!  However, I need to build an application which has several Forms.  I was brought up on the concept of only writing code once and using it everywhere.  So,
What I need to be able to do is to:
<ol>
Hold data arrays in one piece of code, say MyData.CS and access it from all of my Forms.
Hold pieces of code,( like subs in VB ) which perform specific tasks and which are, again, accessible from all my forms.  these may access the API or just do general stuff.  I can write the code, but I just cant access it.</ol>
So far, I have been able to handle single point variables in this way, but I dont seem to be able to do the same with arrays.  Also, I can never access my global code. 
 
Am I missing something???
 
Many thanks in antisiaption.
 
John Woodiwiss
 

View the full article
 
Back
Top