Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# inline array initialization

var array = new string[2]; // creates array of length 2, default values
var array = new string[] { "A", "B" }; // creates populated array of length 2
string[] array = { "A" , "B" }; // creates populated array of length 2
var array = new[] { "A", "B" }; // created populated array of length 2 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #inline #array #initialization
ADD COMMENT
Topic
Name
5+5 =