C# for Java Developers. Keywords. Operators. Common Datatypes. Development Areas. C# Features ... protected Declares a m
C# for Java Developers. Keywords. Operators. Common Datatypes. Development Areas. C# Features ... protected Declares a m
LISTS. Tuples. Tuples are designed to group data (multiple types allowed). (El1,El2,[Elxâ¦]) Sample: ("James",41,1.85).
v-button. CheckBox v-checkbox. TextField v-textfield. RichTextArea .... Use a HTML template having
through the backlog, so the first step is schedule a block of time(s) into your ... Sort by the Sender column and once a
Remember: git command --help. Global Git configuration is stored in $HOME/.gitconfig (git config --help). Files changed
History of changes git log. Who changed what and when in a file git blame $file. What changed between $ID1 and $ID2 git
R Markdown Cheat Sheet learn more at rmarkdown.rstudio.com rmarkdown 0.2.
50 Updated: 8/14. 1. Workflow R Markdown is a format for writing reproducible, ...
Should prospect short, targeted âtop 5/10â lists, their current customer base, and develop ... Prospecting Cycle Length: Measure the time between when the prospect first responds to a campaign to ..... social media, or publishing expert content.
You should sign up for free (no spam) email updates here. latest changes ... Get$More$Users$with$our$Professional$App$Ma
Visit http://groups.yahoo.com/group/onestopgre / for joining the club of GRE
Aspirants. 1. MATH CHEAT SHEET. Basic Math and Pre-Algebra Cheat Sheet.
It is important that information used on this sheet is information that will be helpful
... Every time you sit down to study, start by writing out your “cheat sheet” to see ...
Internet Protocol Version 6 (IPv6) Basics cheat sheet – 20130711 ... ARP •
stateless address configuration without DHCP • improved multicast • easy IP ....
further switches (host 2001:db8::1) or with dig using the -x switch (dig -x 2001:
db8::1).
CHEAT SHEET FOR FINAL. Statistical Mechanics and Chemical Dynamics (
Chem 130C). (Dated: June 6, 2008). Boltzmann Constant: kB = 1.381 × 10. −23.
HTML 5 NEW TAG. TAG NOT SUPPORTED lN HTML 5. I < coniniand>. < l--. -->
Define a comment. Defines the document type. Defines a ...
HTML Cheatsheet page 1 of 2. Basic Tags. . Creates an HTML
document. . Sets off the title & other info that isn't displayed.
Quick Reference Guide ... V = Which version of HTML is this tag valid for. Tag.
Info .... html document. 4 / 5 manifest. italic text. 4 / 5 global attributes**
.
pattern function . match any character. *. 0 or more of previous expression. +. 1 or more of previous expression ? 0 or
bday category class contact description dtend dtreviewed dtstart dtstamp duration education email type value entry-conte
Border Radius vendor prefix required for iOS
Twitterâan online social networking platform that allows users to send and receive ... want a management system that h
A cheat sheet to the C# language, ideal for newcomers to the language for more visit http://www.thecodingguys.net
KEEP IN TOUCH
TABLE OF CONTENTS LICENSE
3
LANGUAGE BASICS
4
Introduction
4
Variables Syntax Naming Rules Example
4 4 4 4
Arrays Syntax Example
4 4 5
Strings Concatenation Example New Line Example String.Format Example
5 5 5 5 5 5 5
CONDITIONAL STATEMENTS
6
If statements Syntax Example
6 6 6
If Else Statements Example
6 6
Switch Statement Syntax Example
6 7 7
LOOPS
8
While Loop Syntax Example
8 8 8
For Loop Syntax Example
8 8 9
For Each Syntax Example
ADVANCED – EXCEPTIONS, METHODS & CLASSES
9 9 9
10
Exceptions Syntax Example
10 10 10
Methods Syntax Example Passing Parameters Returning Data
10 10 11 11 11
Classes Syntax Example
12 12 12
SUMMARY
12
Why Not Give us a like?
12
LICENSE This work is licensed under the creative commons Attribution-NonCommercial-NoDerivs 3.0 Unported You may not alter, transform, or build upon this work. You may not use this work for commercial purposes. You are free to copy, distribute and transmit the work
LANGUAGE BASICS INTRODUCTION C# is a powerful Object Orientated language, for those coming from Java or C++ you should be able to pick up the syntax for C# quickly. A few points:
The language is case-sensitive (So A and a are different) Lines terminate with semi-colons Code is put in code blocks { } Inline comments start with // Block comments start with /* */ XML comments start with ///
VARIABLES To declare a variable you specify the data type and variable name followed by a value.
SYNTAX DataType variableName = value;
NAMING RULES
Variables must start with underscore or letter Variables cannot contain spaces variables can contain numbers Cannot contain symbols (accept underscore)
EXAMPLE string Name = "thecodingguys"; int Year = 2013;
I will use these two variables throughout.
ARRAYS Arrays are similar to variables, but can hold more than one value.
SYNTAX DataType[ ] ArrayName = { Comma Separated Values } // Array of any size DataType[] ArrayName = new DataType[3] {Command Separated Values } //Expects 3 values
EXAMPLE string[] MyGamesOf2013 = {"GTAV", "Battlefield3"}; string[] MyMoveisOf2013 = new string[3] {"The Amazing Spiderman", "The Expendables 2", "Rise of the planet of the apes"};
STRINGS CONCATENATION Concatenation is done through the + operator.
EXAMPLE Console.WriteLine("Hello " + "World");
NEW LINE EXAMPLE Console.WriteLine("Hello \n" + "World");
STRING.FORMAT Formats an object, you specify the formatting you wish to perform, the following formats an integer and displays the currency symbol.
EXAMPLE Console.WriteLine(string.Format("{0:C}", 5));
Depending on your computers regional settings you will see £5.00 displayed (You’ll see your countries currency symbol). The 0:C is the formatting we wish to do, in this case it means format the first parameter (0) and show a currency sign.
CONDITIONAL STATEMENTS IF STATEMENTS if statement is used to execute code based on a condition the condition must evaluate to true for the code to execute.
SYNTAX if (true) { }
EXAMPLE if (Year > 2010) { Console.WriteLine("Hello World!"); }
IF ELSE STATEMENTS if a condition does not evaluate to true you can use an if else statement to execute other code.
EXAMPLE if (Year > 2015) { Console.WriteLine("Hello World!"); } else { Console.WriteLine("Year is: " + Year); }
SWITCH STATEMENT Similar to the If else statement, however it has these benefits.
Much easier to read and maintain Much cleaner then using nested if else It only evaluates one variable
SYNTAX switch (switch_on) { default: }
EXAMPLE switch (Year) { case 2013 : Console.WriteLine("It's 2013!"); break; case 2012 : Console.WriteLine("It's 2012!"); break; default : Console.WriteLine("It's " + Year + "!"); break; }
The break keyword is required as it prevents case falling.
LOOPS WHILE LOOP Continuously loops code until the condition becomes false.
SYNTAX while (true) { }
EXAMPLE while (Year >= 2013) { if (Year != 2100) { Console.WriteLine(Year++); } else { break; } }
Make sure your condition evaluates to false at some point otherwise the loop is endless and it can result in errors.
FOR LOOP Similar to the While Loop, but you specify when the loop will end.