How to store and restore a 3D string array to a file in C#? Hi; I am programing a project that I create a class for public Arrays so I can use them in all forms.
class MainArray
{
// Introduce Moarefi Projeh public static string[] MPArray = new string[15]; // Introduce Moarefi Personel Rozmozd public static string[,] MPRArray = new string[20,15]; // Introduce Moarefi Peymankaran public static string[,] MPeymankaranArray = new string[20, 15]; // Introduce Gozaresh PersonelRozMozd public static string[,] GPRMArray = new string[20, 15]; public static string[,,] MArr = new string[20,20,20];
}
I Save all Data in these arrays in some forms. I want to create a class that operator can store all these arrays in a file at the end of use the program and restore these data at the beginning of next use the program.
You know this is first my programing in C# please give me a class code that I can do this. I want a class code that I use a simple cod in my main program like this: MyData.WriteArray(MyArrayName,FileName); for store and MyData.ReadArray(MyArrayName,FileName); for restore.