Answers for "declare array c3"

C#
21

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};
Posted by: Guest on March-04-2020
1

c# define array

float[] floats = new float[]{1.0,1.1,1.4,1.23,2212.233};
Posted by: Guest on June-04-2021

C# Answers by Framework

Browse Popular Code Answers by Language