\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{HugoZalm} \pdfinfo{ /Title (visual-studio-express-2013-step-by-step.pdf) /Creator (Cheatography) /Author (HugoZalm) /Subject (Visual Studio Express 2013 Step by Step 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}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \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{Visual Studio Express 2013 Step by Step Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{HugoZalm} via \textcolor{DarkBackground}{\uline{cheatography.com/20291/cs/3179/}}} \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}HugoZalm \\ \uline{cheatography.com/hugozalm} \\ \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 12th May, 2016.\\ 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}{x{8.635 cm} x{8.635 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{H1 Quick Reference}} \tn % Row 0 \SetRowColor{LightBackground} Create a new console application using Visual Studio 2013 & On the File menu, point to New, and then click Project to open the New Project dialog box. In the left pane, under Installed Templates, click Visual C\#. In the middle pane, click Console Application. in the Location box, specify a directory for the project files. Type a name for the project and then click OK. \tn % Row Count 16 (+ 16) % Row 1 \SetRowColor{white} Create a new Windows Store blank graphical application for Windows 8.1 using Visual Studio 2013 & On the File menu, point to New, and then click Project to open the New Project dialog box. In the left pane, in the Installed Templates section, expand Visual C\#, and then click Windows Store. In the middle pane, click Blank App (XAML). In the Location box, specify a directory for the project files. Type a name for the project and then click OK. \tn % Row Count 34 (+ 18) \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}{H1 Quick Reference (cont)}} \tn % Row 2 \SetRowColor{LightBackground} Create a new WPF graphical application for Windows 7 or Windows 8 using Visual Studio 2013 & On the File menu, point to New, and then click Project to open the New Project dialog box. In the left pane, in the Installed Templates section, expand Visual C\#, and then click Windows. In the middle pane, click WPF Application. Specify a directory for the project files in the Location box. Type a name for the project and then click OK. \tn % Row Count 17 (+ 17) % Row 3 \SetRowColor{white} Build the application & On the Build menu, click Build Solution. \tn % Row Count 19 (+ 2) % Row 4 \SetRowColor{LightBackground} Run the application in Debug mode & On the Debug menu, click Start Debugging. \tn % Row Count 22 (+ 3) % Row 5 \SetRowColor{white} Run the application without debugging & On the Debug menu, click Start Without Debugging. \tn % Row Count 25 (+ 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}{H2 Quick Reference}} \tn % Row 0 \SetRowColor{LightBackground} Declare a variable & Write the name of the data type, followed by the name of the variable, followed by a semicolon. ` For example: int outcome;` \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} Declare a variable and give it an initial value & Write the name of the date type, followed by the name of the variable, followed by the assignment operator and the initial value. Finish with a semicolon. `For example: int outcome = 99;` \tn % Row Count 17 (+ 10) % Row 2 \SetRowColor{LightBackground} Change the value of a variable & Write the name of the variable on the left, followed by the assignment operator, followed by the expression calculating the new value, followed by a semicolon. `For example: outcome = 42;` \tn % Row Count 27 (+ 10) % Row 3 \SetRowColor{white} Generate a string representation of the value in a variable & Call the ToString method of the variable. `For example: int intVar = 42; string stringVar = intVar.ToString();` \tn % Row Count 33 (+ 6) \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}{H2 Quick Reference (cont)}} \tn % Row 4 \SetRowColor{LightBackground} Convert a string to an int & Call the System.Int32.Parse method. `For example: string stringVar = "42"; int intVar = \seqsplit{System.Int32.Parse(stringVar);`} \tn % Row Count 6 (+ 6) % Row 5 \SetRowColor{white} Override the precedence of an operator & Use parentheses in the expression to force the order of evaluation. `For example: (3 + 4) * 5` \tn % Row Count 11 (+ 5) % Row 6 \SetRowColor{LightBackground} Assign the same value to several variables & Use an assignment statement that lists all the variables. `For example: myInt4 = myInt3 = myInt2 = myInt = 10;` \tn % Row Count 17 (+ 6) % Row 7 \SetRowColor{white} Increment or decrement a variable & Use the ++ or -{}- operator. For example: count++; \tn % Row Count 20 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{4.3175 cm} x{12.9525 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Index}} \tn % Row 0 \SetRowColor{LightBackground} statement & a command that performs an action. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} syntax & well-defind set of rules, describing format and construction \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} semantics & specification of what things do \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{identifier} & a name to identify an element \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} variable & a storage location to hold a value \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} oparator & operate on operands (values) to create new values \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} operands & the values on wich an operator performs its function \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} NaN & Not a Number \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} \seqsplit{precedence} & govern's the order in wich an expression's operators are evaluated. \tn % Row Count 17 (+ 3) % Row 9 \SetRowColor{white} \seqsplit{associativity} & the direction in wich the operands of an operator are evaluated. \tn % Row Count 20 (+ 3) % Row 10 \SetRowColor{LightBackground} method & a named sequence of statements \tn % Row Count 21 (+ 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}{Keywords}} \tn % Row 0 \SetRowColor{LightBackground} reserved keywords & catch false namespace short ushort char finally new sizeof using checked fixed null stackalloc virtual class float object static void const for operator string volatile continue foreach out struct while decimal goto override switch default if params this delegate implicit private throw \tn % Row Count 12 (+ 12) % Row 1 \SetRowColor{white} not to be used keywords & add get remove alias global select ascending group set async into value await join var descending let where dynamic orderby yield from partial \tn % Row Count 18 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{3.7994 cm} x{13.4706 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Naming conventions}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Important} & C\# is case-sensitive ! \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{identifiers} & only letters (upper and lowercase), digits and underscore. Must start with letter or underscore \tn % Row Count 6 (+ 4) % Row 2 \SetRowColor{LightBackground} \seqsplit{variables} & Use camelcase (as camelCase). don't start with underscore. Don't differ only by case. Never use Hungarian notation. \tn % Row Count 10 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{17.67cm}}{\bf\textcolor{white}{Primitive Data Types}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{17.67cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/hugozalm_1421229850_DataType.png}}} \tn \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}{H3 Quick Reference}} \tn % Row 0 \SetRowColor{LightBackground} Declare a method & Write the method within a class. Specify the method name, parameter list, and return type, followed by the body of the method between braces. For example: int addValues(int leftHandSide, int rightHandSide) \{ ... \} \tn % Row Count 11 (+ 11) % Row 1 \SetRowColor{white} Return a value from within a method & Write a return statement within the method. For example: return leftHandSide + rightHandSide; \tn % Row Count 16 (+ 5) % Row 2 \SetRowColor{LightBackground} Return from a method before the end of the method & Write a return statement within the method. For example: return; \tn % Row Count 20 (+ 4) % Row 3 \SetRowColor{white} Call a method & Write the name of the method together with any arguments between parentheses. For example: addValues(39, 3); \tn % Row Count 26 (+ 6) % Row 4 \SetRowColor{LightBackground} Use the Generate Method Stub Wizard & Right-click a call to the method and then, on the shortcut menu, click Generate Method Stub. \tn % Row Count 31 (+ 5) \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}{H3 Quick Reference (cont)}} \tn % Row 5 \SetRowColor{LightBackground} Display the Debug toolbar & On the View menu, point to Toolbars, and then click Debug. \tn % Row Count 3 (+ 3) % Row 6 \SetRowColor{white} Step into a method & On the Debug toolbar, click Step Into. or On the Debug menu, click Step Into. \tn % Row Count 7 (+ 4) % Row 7 \SetRowColor{LightBackground} Step out of a method & On the Debug toolbar, click Step Out. or On the Debug menu, click Step Out. \tn % Row Count 11 (+ 4) % Row 8 \SetRowColor{white} Specify an optional parameter to a method & Provide a default value for the parameter in the method declaration. For example: void optMethod(int first, double second = 0.0, string third = "Hello") \{ ... \} \tn % Row Count 20 (+ 9) % Row 9 \SetRowColor{LightBackground} Pass a method argument as a named parameter & Specify the name of the parameter in the method call. For example: optMethod(first : 100, third : "World"); \tn % Row Count 26 (+ 6) % Row 10 \SetRowColor{white} mixed positional and named arguments & First specify all positional arguments, then named arguments. \tn % Row Count 30 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \end{document}