Skip to content

Instantly share code, notes, and snippets.

@longtth
Created July 1, 2018 15:09
Show Gist options
  • Select an option

  • Save longtth/d530ace48be2c8451d63bf21fe2b9503 to your computer and use it in GitHub Desktop.

Select an option

Save longtth/d530ace48be2c8451d63bf21fe2b9503 to your computer and use it in GitHub Desktop.
string[] array = new string[2]; // creates array of length 2, default values
string[] array = new string[] { "A", "B" }; // creates populated array of length 2
string[] array = { "A" , "B" }; // creates populated array of length 2
string[] array = new[] { "A", "B" }; // created populated array of length 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment