Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading content…
Loading…
Transcript

INTRODUCTION

- CLR

- CTS

-MSIL

- Interoperability

- Assemblies

Syllabi

- Introduction

- C# Object Model

- Inheritance and Interfaces

-Extensible types

- Collections

- Visual Studio 2015 Environment

- Console based and Graphical

applications

- Use of namespaces

Namespace vs Assemblies

- namespace is a collection

assembly is compilation (.exe or .dll)

- namespace -source modularity

assembly- deployment modularity

- namespace-one or more assemblies

assemblies - one or more namespaces

- namespace e.g - System

assembly e.g. mscorlib.dll

Working with Variables, operators and Expressions

-command that performs any action

-rules for format and construction (syntax)

- what they actually do (semantics)

-identify different elements in the program

like namespaces, classes, methods, variables

- Rules : (i) only alphabets, digits and _

(ii) must start with alphabet or _

(iii) Case sensitive

-Name a variable

-Naming conventions :

->dont start with _ as it limits interoperability

-> dont create variables that just differ by case

-> Start with lowercase

-> For multiword follow camelCase

-> Dont use Hungarian notations

Primitive Types

Unassigned local variables

-- Definite assignment rule

advantages: -more readable and less error prone

-Result of numeric expressions

- Infinity and NaN

- An example Operators code

Associativity and assignment operator

-named sequence of statements

-method has name which is to indicate the purpose

Method declaration

returnType methodname (parameterList seperated by comma)

using expression bodied methods

-for simple methods -its a short cut

- use => operator

calling methods

-result=methodname(argumentList)

Applying scope

period of existence

local (method)

global(class)

Method overloading

same name but different parameters

number of parameters or type of parameters

no return type overloading

Optional parameters - required when there is no overloading support

Decision statements

bool

Equality operators == and !=

Relational operatos <, >, <=, >=

Conditional logical operators: &&, ||

Blocks - group of statement

Third type of scoping - block scope

switch rules:

- use switch only on int, char or string

- case labels must be constant expressions

- case labels must be unique

- mutiple case for single statement(s) possible

- beware of fall throughs

Compound Assignments

understanding for statement scope

Coping with errors

Error code -traditional technique

Error code - too painful

for robust programs in C#

use Exception handling

unhandled exceptions??

- Multiple catch handlers

- Catch all??

Associativity

Precedence

-new feature of C#6.0

Coping with errors

Learn more about creating dynamic, engaging presentations with Prezi