Answers for "c# initialize array of size"

C#
31

c# initialize array

string[] stringArray = new string[6];
//or
int[] array1 = new int[] { 1, 3, 5, 7, 9 };
//
string[] weekDays = new string[] { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
//etc
Posted by: Guest on April-02-2020
0

declare string array c# without size

List<string> myStringList = new List<string();
myStringList.Add("Test 1");
myStringList.Add("Test 2");
Posted by: Guest on May-22-2020

C# Answers by Framework

Browse Popular Code Answers by Language