roujesky
asked on
C# winform large initialized array.... where to keep it??
I have a large byte array that I initialize. it is like 1000 members, so it is over a page by itself. I would like to keep it in a seperate file. in C, just create a header file, stick it in there, and include the .h file in the source file.
What is the accepted method of doing this in C#?
thanks!
What is the accepted method of doing this in C#?
thanks!
ASKER
This sounds great! One question. How do I create the file for the array? I already have a Form1.cs. Do I just create a blank file and manually add everything? Or is there some smart wizard in vs2013 that I can tell it that I am creating another partial class called Form1???
thanks!
thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks!
In your case you could do something like -
Form1.cs -
Open in new window
Form1.Designer.cs -Open in new window
Form1.Array.cs -Open in new window
Using this configuration, you can see that the array defined in the Form1.Array file is still accessible in the Form1 file, as well as the Form1.Designer file -If you want the additional partial file to show as a dependent file of Form1, you simply modify the xml of the project file and make Form1.Array.cs 'DependentUpon' Form1:
Before modifying the project file:Modifying the project file:After modifying the project file:
-saige-