I have a 2D array that I need to be able to convert to a string representation and back to array format. I would like to create a generci method that will handle any array 1d, 2d, 3d etc. so I can reuse the method in future.
What is the best way of going about this?
string[,] _array = new string[_helpTextItemNames.Count, 2];
If you do not care to much about the structure of the string then the SoapFormatter is an option. Here is a quick and dirty example. Not pretty but it might work for you.
These helpers can be used to transform any Serializable object to a string, including arrays, as long as the elements of the array are serializable.