C Sharp Crash Course

36
For Beginners @shahedC WakeUpAndCode.com

description

C# Crash Course for college students and any beginner who wants to learn the popular language.

Transcript of C Sharp Crash Course

Page 1: C Sharp Crash Course

For Beginners

@shahedC

WakeUpAndCode.com

Page 2: C Sharp Crash Course

Introduction

> Variables, Operators & Loops

> Classes & Methods

> Files & Exceptions

Additional Topics

Page 3: C Sharp Crash Course

Period Background/Experience

1997 –

present

Microsoft web/software development

2011 XNA games on XBLIG for Xbox 360

• 2D Math Panic

• Angry Zombie Ninja Cats

2012 Tools for XNA developers

• XBLIG Sales Data Analyzer (OnekSoftLabs.com)

• XNA Basic Starter Kit (CodePlex)

Online: http://facebook.com/OnekSoftGames

Page 4: C Sharp Crash Course

Period Background/Experience

2013 • Ninja Cat Runner on Win8, WP8, Web (Construct 2)

• Video Q&A with MS Tech Evangelist Frank La Vigne

• Founder/Admin of FB groups: Construct2, Xbox One & Unity Indie Devs

• Started Public Speaking in DC area and East Coast

2014 • Public Speaking on Indie Game Development

• Joined Microsoft as a Sr. Technical Evangelist

• Gallant Glider on Win8, WP8, Web (Construct 2 Universal App)

Video Q&A: http://youtu.be/lRjrQPvVOpo MVA: http://aka.ms/DevGames-Const2

Page 5: C Sharp Crash Course

Source: Official Xbox Magazine, March 2014, Page 65

`

Page 6: C Sharp Crash Course
Page 7: C Sharp Crash Course

http://www.visualstudio.com/downloads

Page 8: C Sharp Crash Course

References

Properties

Panel

Code Editor

Toolbar

Solution

Explorer

Ouput

Start (Run)

Page 9: C Sharp Crash Course
Page 10: C Sharp Crash Course

http://www.dotnetspark.com/tutorialpic/clr.png

Page 11: C Sharp Crash Course

Start/Continue

Page 12: C Sharp Crash Course
Page 13: C Sharp Crash Course

Variables

classMethod ( )

Data Types

• Integer

• String

• var?

Assignment

Output

namespace

using statements

// 1-line comment

/* multi-line

comments */

Page 14: C Sharp Crash Course
Page 15: C Sharp Crash Course

Type Operators

Unary Postfix Operators ++ --

Unary Prefix Operators ++ -- + -

Multiplicative Operators * / % (modulus)

Additive Operators + -

Assignment Operators =

hig

her

low

er

Page 16: C Sharp Crash Course

Type Operators

Equality == !=

Logical AND &

Logical XOR ^

Conditional AND &&

Conditional OR ||

Conditional Ternary Operator ?:

Page 17: C Sharp Crash Course
Page 18: C Sharp Crash Course

Declare

& Assign

StringBuilder

Special CharactersConcatenateLiteral

string.Format()Char Array

String

Functions

Page 19: C Sharp Crash Course
Page 20: C Sharp Crash Course

for loop

while loop

continue

break

switch-case statements

default break

if/else

blocks

Page 21: C Sharp Crash Course
Page 22: C Sharp Crash Course
Page 23: C Sharp Crash Course

1

23

Page 24: C Sharp Crash Course

constructors

properties

Instance

variable

public method

private

methods

(overloaded)

class declaration

this keyword

Page 25: C Sharp Crash Course

parent class

complex

object

public

method

private variable

Page 26: C Sharp Crash Course
Page 27: C Sharp Crash Course
Page 28: C Sharp Crash Course

1

23

Page 29: C Sharp Crash Course

1

2

3

Page 30: C Sharp Crash Course

Set to

“Copy always”enter sample data

Page 31: C Sharp Crash Course

Use System.IO namespace for

StreamReader

Handle possible

exceptions with

try-catch block

Page 32: C Sharp Crash Course
Page 33: C Sharp Crash Course
Page 34: C Sharp Crash Course
Page 35: C Sharp Crash Course

http://www.microsoftvirtualacademy.com/training-courses/c-fundamentals-for-absolute-beginners

http://www.microsoftvirtualacademy.com/training-courses/developer-training-with-programming-in-c