12-03-2012, 02:28 PM
Basic Introduction to C#
Introduction to C#.ppt (Size: 305.5 KB / Downloads: 77)
Why C# ?
Builds on COM+ experience
Native support for
Namespaces
Versioning
Attribute-driven development
Power of C with ease of Microsoft Visual Basic®
Minimal learning curve for everybody
Much cleaner than C++
More structured than Visual Basic
More powerful than Java
C# Program Structure
Namespaces
Contain types and other namespaces
Type declarations
Classes, structs, interfaces, enums, and delegates
Members
Constants, fields, methods, properties, indexers, events, operators, constructors, destructors
Organization
No header files, code written “in-line”
No declaration order dependence
Statements and Comments
Case sensitive (myVar != MyVar)
Statement delimiter is semicolon
Block delimiter is curly brackets
Single line comment is
Block comment is
Save block comments for debugging!
Value Data Types
Directly contain their data:
int (numbers)
long (really big numbers)
bool (true or false)
char (unicode characters)
float (7-digit floating point numbers)
string (multiple characters together)
Hello World Anatomy
Contained in its own namespace
References other namespaces with "using"
Declares a publicly accessible application class
Entry point is "static int Main( ... )"
Writes "Hello World!" to the system console
Uses static method WriteLine on