Created
June 9, 2019 04:05
-
-
Save techthoughts2/530d7dadd25394466093fa416ca2788e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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