Jul 21, 2024
Tools > Options. Increase text size under Environment and Text Editor.File > New > ProjectVisual C# and choose Console App (.NET Core) or other desired templateCreateusing System;) to import classes and functionsbool, int, long, decimal, double, and float data typesbool canIVote = true; int age = 30;parse and toString methods\n, \t, \\, etc.)+, -, *, /, %)++) and Decrement (--) operators+=, -=, *=, /=, %=)Length, Contains, IndexOf, Remove, Insert, Replace, etc.$ and {}if...else if...else>, <, >=, <=, ==, !=) and logical (&&, ||, !) operatorscondition ? consequence : alternativestring canDrive = age >= 16 ? "Yes" : "No";switch(variable) { case value: //statements; break; ...}for(initialization; condition; iteration) { //code }truetry, catch, and finally blocksaccess specifier return_type function_name(parameters) { //code }Class Animal with attributes: name, sound, methodsClass Dog inherits Animal, add unique attributesIDrivable interface with methods Move, Stopdelegate, lambda expressionspublic delegate void Arithmetic(int x, int y);int[] array = new int[5];Dictionary<int, string> dictfrom item in collection where condition select itemThread.Sleep(1000);lock for thread safety