1. Inline Assignment with Values
string[] tFile = { "file1.txt", "file2.txt", "file3.txt" };
2. Using
new
Keyword with Initializerstring[] tFile = new string[] { "file1.txt", "file2.txt", "file3.txt" };
3. Declaring Array Size First, Then Assigning
4. From a List
Example Usage in a Loop:
Sign up here with your email
ConversionConversion EmoticonEmoticon