Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# create array

// Define and Initialize
int[] arr = {1, 2, 3};

// Buuuut:
// Initial defining
int[] arr;

// This works
arr = new int[] {1, 2, 3};   

// This will cause an error
// arr = {1, 2, 3}; 
Source by www.codecademy.com #
 
PREVIOUS NEXT
Tagged: #create #array
ADD COMMENT
Topic
Name
5+3 =