Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// This is a comment
/*
This is a section of comments
*/
Console.Read(); //this is an inline comment
int aNumber = 0; //declare value type variable
//casting
float num1 = 20.9;
decimal num2 = (decimal) num1;
//arrays
int[] userAge = {21, 22, 23, 24, 25}; //initialize at point of decleration
//initialize later
int[] userAge2;
userAge2 = new [] {21, 22, 23, 24, 25};
userAge.Length
Array.Sort(userAge);
Array.IndexOf(userAge ,21) //index of first value found
5==5 && 2>1 && 3!=7
5==5 || 2<1 || 3==7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.