\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Veyleria} \pdfinfo{ /Title (general-c.pdf) /Creator (Cheatography) /Author (Veyleria) /Subject (General C\# Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{8B5EB8} \definecolor{LightBackground}{HTML}{F7F4FA} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{General C\# Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Veyleria} via \textcolor{DarkBackground}{\uline{cheatography.com/99177/cs/21007/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Veyleria \\ \uline{cheatography.com/veyleria} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 3rd November, 2019.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{tabularx}{17.67cm}{p{1.647 cm} x{5.1057 cm} x{5.9292 cm} x{3.7881 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{17.67cm}}{\bf\textcolor{white}{Data Types}} \tn % Row 0 \SetRowColor{LightBackground} byte & 8-bit unsigned integer & 0 to 255 & `byte value = 255;` \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} int & 32-bit signed integer & -2,147,483,648 to 2,147,483,647 & `int value = 3;` \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} float & 32-bit \seqsplit{Single-precision} floating point type & -3.402823e38 to 3.402823e38 & `float value = 6.3F;` \tn % Row Count 10 (+ 4) % Row 3 \SetRowColor{white} char & 16-bit single Unicode character & Any valid character, e.g. a,*, \textbackslash{}x0058 (hex), or\textbackslash{}u0058 (Unicode) & `char value = 'H';` \tn % Row Count 15 (+ 5) % Row 4 \SetRowColor{LightBackground} bool & 8-bit logical true/false value & True or false. & `bool value = true;` \tn % Row Count 18 (+ 3) % Row 5 \SetRowColor{white} \seqsplit{string} & A sequence of Unicode characters & Combination of characters. & `string value = \seqsplit{"Hello";`} \tn % Row Count 21 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{17.67cm}}{\bf\textcolor{white}{Type Conversion Methods}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{17.67cm}}{\seqsplit{`Convert.ToBoolean(variable);`}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{17.67cm}}{\seqsplit{`Convert.ToByte(variable);`}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{17.67cm}}{\seqsplit{`Convert.ToChar(variable);`}} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{17.67cm}}{\seqsplit{`Convert.ToDateTime(variable);`}} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{17.67cm}}{\seqsplit{`Convert.ToInt32(variable);`}} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{17.67cm}}{\seqsplit{`Convert.ToString(variable(;`}} \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{8.1169 cm} x{9.1531 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Naming Convensions}} \tn % Row 0 \SetRowColor{LightBackground} Class & MyClass \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Method & MyMethod \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Local variable & myLocalVariable \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Private variable & \_myPrivateVariable \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Constant & MyConstant \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{6.3899 cm} x{10.8801 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Statements}} \tn % Row 0 \SetRowColor{LightBackground} if-else & `if (true) \{...\} else if (true) \{...\} else \{...\}` \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} switch & `switch (var) \{ case 1: break; default: break; \}` \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} for & `for (int i =1; i \textless{} 5; i++) \{...\}` \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} foreach & `foreach (int item in array) \{...\}` \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} while & `while (true) \{...\}` \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} do-while & `do \{...\} while (true);` \tn % Row Count 10 (+ 1) % Row 6 \SetRowColor{LightBackground} \seqsplit{try-catch-finally} & `try \{...\} catch (Exception e) \{...\} catch \{...\} finally \{...\}` \tn % Row Count 13 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{8.635 cm} x{8.635 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Arrays and Methods}} \tn % Row 0 \SetRowColor{LightBackground} `int{[}{]} array = new int{[}{]} \{1, 2, 3\};` & Defines a new array. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `int{[}{]} array = \{1, 2, 3\};` & Defines a new array. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} `var array = new int{[}{]} \{1, 2, 3\};` & Defines a new array. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} `int{[}{]} array = new int{[}3{]};` & Defines a new array. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} `int{[},{]} array2D = new int{[},{]} \{ \{ 1, 2 \}, \{ 3, 4 \}, \{ 5, 6 \}, \{ 7, 8 \} \};` & Defines a new two dimensional array. \tn % Row Count 12 (+ 4) % Row 5 \SetRowColor{white} `int{[},{]} array2Da = new int{[}4, 2{]} \{ \{ 1, 2 \}, \{ 3, 4 \}, \{ 5, 6 \}, \{ 7, 8 \} \};` & Defines a new two dimensional array with dimensions specified. \tn % Row Count 16 (+ 4) % Row 6 \SetRowColor{LightBackground} `int{[}, ,{]} array3D = new int{[},,{]} \{ \{ \{ 1, 2, 3 \}, \{ 4, 5, 6 \} \}, \{ \{ 7, 8, 9 \}, \{ 10, 11, 12 \} \} \};` & Defines a new three dimensional array. \tn % Row Count 21 (+ 5) % Row 7 \SetRowColor{white} `int{[}, ,{]} array3Da = new int{[}2, 2, 3{]} \{ \{ \{ 1, 2, 3 \}, \{ 4, 5, 6 \} \}, \{ \{ 7, 8, 9 \}, \{ 10, 11, 12 \} \} \};` & Defines a new three dimensional array with dimensions specified. \tn % Row Count 27 (+ 6) % Row 8 \SetRowColor{LightBackground} \seqsplit{`array.GetLength(int32)`} & Gets a 32-bit integer that represents the number of elements in the specified dimension of the Array. \tn % Row Count 33 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.9045 cm} x{4.7236 cm} x{6.2419 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Classes}} \tn % Row 0 \SetRowColor{LightBackground} Class & `public class Animal \{...\}` & Makes a new class named Animal. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Inheritance & `public class Dog:Animal \{...\}` & Inherits from a class. Example every animal has a size, but not every animal is the same size. \tn % Row Count 10 (+ 7) % Row 2 \SetRowColor{LightBackground} Constructor (no parameters) & `public Dog() \{...\}` & Method in a class that activates when the class is instanciated. \tn % Row Count 15 (+ 5) % Row 3 \SetRowColor{white} Constructor (one parameter) & `public Dog (string var) \{...\}` & Method in a class that activates when the class is instanciated with parameters. \tn % Row Count 21 (+ 6) % Row 4 \SetRowColor{LightBackground} Deconstructor (cannot have parameters) & `\textasciitilde{}Dog () \{...\}` & Method in a class that activates when the class is destroyed. \tn % Row Count 26 (+ 5) % Row 5 \SetRowColor{white} Call method & \seqsplit{`MethodName();`} & Calls a custom or already existing method. \tn % Row Count 29 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{8.4623 cm} x{8.8077 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Lists and Methods}} \tn % Row 0 \SetRowColor{LightBackground} `List\textless{}Type\textgreater{} listName = new List\textless{}T\textgreater{}();` & Declares a new list. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `listName.Count` & Gets the number of elements contained in the List\textless{}T\textgreater{}. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} `listName.Add(T);` & Adds an object to the end of the List\textless{}T\textgreater{}. \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} \seqsplit{`listName.Clear();`} & Removes all elements from the List\textless{}T\textgreater{}. \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{`listName.Contains(T);`} & Determines whether an element is in the List\textless{}T\textgreater{}. \tn % Row Count 13 (+ 3) % Row 5 \SetRowColor{white} \seqsplit{`listName.Equals(Object);`} & Determines whether the specified object is equal to the current object. \tn % Row Count 17 (+ 4) % Row 6 \SetRowColor{LightBackground} \seqsplit{`listName.IndexOf(T);`} & Searches for the specified object and returns the zero-based index of the first occurrence within the entire List\textless{}T\textgreater{}. \tn % Row Count 23 (+ 6) % Row 7 \SetRowColor{white} \seqsplit{`listName.Remove(T);`} & Removes the first occurrence of a specific object from the List\textless{}T\textgreater{}. \tn % Row Count 27 (+ 4) % Row 8 \SetRowColor{LightBackground} \seqsplit{`listName.RemoveAt(Int32);`} & Removes the element at the specified index of the List\textless{}T\textgreater{}. \tn % Row Count 30 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{2.1931 cm} x{9.7846 cm} x{4.8923 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Access Modifiers}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{public} & Accessible by any other code in the same assembly or another assembly that references it. & `public int ...;` \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \seqsplit{private} & Only accessible by code in the same class or struct. & `private int ...;` \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} \seqsplit{protected} & Only accessible by code in the same class or struct, or in a derived class & `protected int ...;` \tn % Row Count 11 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{1.687 cm} x{7.5915 cm} x{7.5915 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Other Modifiers}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{abstract} & Indicates that a class is intended only to be a base class of other classes. & `abstract class Shape \{ ... \}` \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} async & Indicates that the modified method, lambda expression, or anonymous method is asynchronous. (This is used if a function needs to have an delay or await) & `private async void Task() \{ ... \}` \tn % Row Count 14 (+ 9) % Row 2 \SetRowColor{LightBackground} const & Specifies that the value of the field or the local variable cannot be modified. (You cannot say X = 1; later in the program if it's a const) & `const int X = 0;` \tn % Row Count 22 (+ 8) % Row 3 \SetRowColor{white} event & Declares an event. Mostly used in combination with an delegate. & `public event \seqsplit{SampleEventHandler} SampleEvent;` \tn % Row Count 26 (+ 4) % Row 4 \SetRowColor{LightBackground} \seqsplit{delegate} & Declares a delegate. Mostly used in combination with an event. & `public delegate void \seqsplit{SampleEventHandler(object} sender, SampleEventArgs e;` \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{1.687 cm} x{7.5915 cm} x{7.5915 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Other Modifiers (cont)}} \tn % Row 5 \SetRowColor{LightBackground} new & The new operator creates a new instance of a type. & `public Random random = new Random();` \tn % Row Count 3 (+ 3) % Row 6 \SetRowColor{white} \seqsplit{override} & Provides a new implementation of a virtual member inherited from a base class. & `public override void ToString() \{ ... \}` \tn % Row Count 8 (+ 5) % Row 7 \SetRowColor{LightBackground} \seqsplit{readonly} & Declares a field that can only be assigned values as part of the declaration or in a constructor in the same class. (Same as const, you cannot change the value later) & `private readonly int value = 6;` \tn % Row Count 18 (+ 10) % Row 8 \SetRowColor{white} \seqsplit{static} & Declares a member that belongs to the type itself instead of to a specific object. & `static int = 7;` \tn % Row Count 23 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{p{1.727 cm} x{15.543 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Assigment Operators}} \tn % Row 0 \SetRowColor{LightBackground} = & Simple assignment. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} += & Addition assignment. \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} -= & Subtraction assignment. \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} *= & Multiplication assignment. \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} /= & Division assignment. \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \%= & Remainder assignment. \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \&= & AND assignment. \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} |= & OR assignment. \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{p{1.727 cm} x{15.543 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Comparison Operators}} \tn % Row 0 \SetRowColor{LightBackground} \textless{} & Less than. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{} & Greater than. \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \textless{}= & Less than or equal to. \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \textgreater{}= & Greater than or equal to. \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} == & Equal to. \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} != & Not equal to \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{p{1.727 cm} x{15.543 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Arithmetic Operators}} \tn % Row 0 \SetRowColor{LightBackground} + & Add numbers. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} - & Subtract numbers. \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} * & Multiply numbers. \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} / & Devide numbers. \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \% & Compute remainder of division of numbers. \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} ++ & Increases integer value by 1. \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} -{}- & Decreases integer value by 1. \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{p{2.4178 cm} x{14.8522 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Logical Operators}} \tn % Row 0 \SetRowColor{LightBackground} \&\& & Logical AND. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} || & Logical OR. \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} ! & Logical NOT. \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{p{1.687 cm} x{7.4228 cm} x{7.7602 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Other Operators}} \tn % Row 0 \SetRowColor{LightBackground} \& & Returns the address of a variable. & \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} * & Pointer to a variable. & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} ? : & Conditional expression. & `is this condition true ? yes : no;` \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} is & Determines whether an object is of a specific type. & \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} as & Cast without raising an exception if the cast fails. & \tn % Row Count 13 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{6.0445 cm} x{11.2255 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Console}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{`Console.Clear();`} & Clears the console buffer and corresponding console window of display information. \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \seqsplit{`Console.ReadKey();`} & Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window. \tn % Row Count 9 (+ 5) % Row 2 \SetRowColor{LightBackground} \seqsplit{`Console.ReadLine();`} & Reads the next line of characters from the standard input stream. \tn % Row Count 12 (+ 3) % Row 3 \SetRowColor{white} \seqsplit{`Console.WriteLine();`} & Writes the current line terminator to the standard output stream. \tn % Row Count 15 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{7.5988 cm} x{9.6712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Misc}} \tn % Row 0 \SetRowColor{LightBackground} // & Adds a comment. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \#region RegionName - \#endregion & Makes a region (for code colapsing) and ends it with endregion. \tn % Row Count 4 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \end{document}