String Array to a text file
All C# objects, variables, and constants must have a specific type. An array is a data structure that contains multiple variables of the same type. Arrays helps us create shorter and simpler code in many situations.
string months = new string;
C# arrays are zero indexed, that is the array indexes start at zero. The default number of array elements is set to zero and the reference element is set to null.
The elements of an array can be of any type, including an array type. The following C# source code shows how to write the array content into a text file.