At Amazon you can download the new and expanded C# cheat sheet. It’s called C# – Three-Chapter Cheat Sheet.
It is divided into 3 sections, each section having 4 as listed below. The new version will have almost all of the old content, but I have decided to expand it and add a few new topics in each section as well as expand some topics to be more complete.
Free C# Cheat Sheet (12 pages)
- . The classic textbook “The C Programming Language”, 2 nd edition, by Kernighan & Ritchie. Written by the architects of the C language, this text was published in 1988 but has endured as both a reference and as a tutorial. The more recent text “C: A Reference Manual”, 4 th edition, by Harbison & Steele.
- All features of the C# 8 Cheatsheet. The cheat sheet includes the following. 1) Default interface methods. 2) Nullable reference types. 3) Pattern matching.
Here below is the downloadable older C# Cheat Sheet from last year, 2019. I had taken it down but now, in August 2020 I’ve decided to put it back up for downloading. It has 12 pages. It’s just over half the size of the one over at Amazon.
C♯ Minor Cheat Sheet. All Cheat Sheets. (F#, C#, G#, and D#). It is the 9th most popular key among Minor keys and the 17th most popular among all keys. Cheat Sheet: Best practices for writing XML documentation in C# Published 2015-03-11 Updated 2018-10-04 The XML documentation tags of C# are described very well in the MSDN.
Data Types
boolBoolean valuebyte8-bit unsigned integerchar16-bit Unicode characterdecimal128-bit precise decimal values with 28-29 significant digitsdouble64-bit double-precision floating pointfloat32-bit single-precision floating pointint32-bit signed integerlong64-bit signed integerobjectBase type for all other typessbyte8-bit signed integershort16-bit signed integerstringString valueuint32-bit unsigned integerulong64-bit unsigned integerushort16-bit unsigned integerType Conversion Methods
ToBooleanToByteToCharToDateTimeToDecimalToDoubleToInt16ToInt32ToInt64ToSbyteToSingleToStringToTypeToUInt16ToUInt32ToUInt64Naming Conventions
ClassMyClassMethodMyMethodLocal variablemyLocalVariablePrivate variable_myPrivateVariableConstantMyConstantArrays
int[] array = new int[] {1, 2, 3}int[] array = {1, 2, 3}var array = new int[] {1, 2, 3}int[] array = new int[3]Statements
if-elseif (true) {...}else if (true) {...}
else {...}switchswitch (var) {
case 1: break;
default: break; }forfor (int i =1; i < 5; i++) {...}foreach-inforeach (int item in array) {...}whilewhile (true) {...}do... whiledo {...}
while (true);try-catch-finallytry {...}
catch (Exception e) {...}
catch {...}
finally {...}
Classes
Classpublic class Dog {...}Inheritancepublic class Dog: Pet {...}Constructor (no parameters)public Dog () {...}Constructors can co-existConstructor (one parameter)public Dog (string var) {...}Constructors can co-existFieldpublic string nameStatic Classpublic static class Dog {...}Must only have static membersStatic Memberpublic static int = 1Finalizer (destructor)~Dog () {...}Cannot have modifiers or parametersAccess Modifiers
publicAccessible by any other code in the same assembly or another assembly that references itprivateOnly accessible by code in the same class or structprotectedOnly accessible by code in the same class or struct, or in a derived classinternalAccessible by any code in the same assembly, but not from another assemblyprotected internalAccessible by any code in the same assembly, or by any derived class in another assemblyOther Modifiers
abstractIndicates that a class is intended only to be a base class of other classesasyncIndicates that the modified method, lambda expression, or anonymous method is asynchronous


Assignment Operators
=Simple assignment+=Addition assignment-=Subtraction assignment*=Multiplication assignment/=Division assignment%=Remainder assignment&=AND assignment|=OR assignment^XOR assignment<<=Left-shift assignment>>=Right-shift assignmentComparison Operators
<Less than>Greater than<=Less than or equal to>=Greater than or equal toEqual to!=Not equal toArithmetic Operators
+Add numbersC Sharp Cheat Sheets
-
Logical and Bitwise Operators
&&Logical AND||Logical OR!Logical NOT
C Sharp Cheat Sheet
Binary XOR~Binary Ones Complement<<Binary Left Shift>>Binary Right ShiftOther Operators
sizeof()Returns the size of a data typetypeof()Returns the type of a class&Returns the address of a variable*Pointer to a variable? :Conditional expressionC Sharp Syntax Cheat Sheet
isDetermines whether an object is of a specific typeasCast without raising an exception if the cast failsC# Cheatsheet 2020
