Home
»
C# Book
»
Language Basics
»
«
C# Book
Introduction
»
1. Language Basics
1. 1.
Introduction
1. 1. 1.
Your first C# program
1. 1. 2.
First program line by line
1. 1. 3.
Program structure
1. 1. 4.
Identifiers
1. 1. 5.
Keywords
1. 1. 6.
Adding @ in front of a keyword
1. 1. 7.
Comments
1. 2.
Data Types
1. 2. 1.
Types and variables
1. 2. 2.
Variable
1. 2. 3.
Data type conversion
1. 2. 4.
Value type vs reference type
1. 2. 5.
null reference value
1. 3.
Predefined Data Types
1. 3. 1.
Predefined data types
1. 3. 2.
Numeric types
1. 3. 3.
Integer type literal
1. 3. 4.
Real number literal
1. 3. 5.
Literal suffix
1. 3. 6.
Default literal
1. 3. 7.
Type conversion for predefined types
1. 3. 8.
Max value and Min value
1. 3. 9.
double vs decimal
1. 3. 10.
bool type
1. 3. 11.
char type
1. 3. 12.
char escape sequence
1. 3. 13.
string type
1. 3. 14.
Compare two string values
1. 3. 15.
Escape sequence for strings
1. 3. 16.
Verbatim string literal
1. 3. 17.
string concatenation
1. 3. 18.
Determine the order
1. 3. 19.
What is an Array
1. 3. 20.
Arrays as Objects
1. 3. 21.
for loop and array
1. 3. 22.
Array initialization
1. 3. 23.
Default array initializing
1. 3. 24.
Multidimensional array
1. 3. 25.
Initialize multidimensional array
1. 3. 26.
Simplified Array Initialization Expressions
1. 3. 27.
var array type
1. 3. 28.
Index out of range exception
1. 3. 29.
Arrays as Arguments
1. 3. 30.
Passing Arrays Using ref and out
1. 4.
Operators
1. 4. 1.
Operators in C#
1. 4. 2.
Arithmetic Operators
1. 4. 2. 1.
Arithmetic operators
1. 4. 2. 2.
Increment operator and decrement operator
1. 4. 2. 3.
Division on integers
1. 4. 2. 4.
Divide by zero exception
1. 4. 2. 5.
Integral type overflow
1. 4. 2. 6.
Check runtime overflow
1. 4. 2. 7.
Turn on the overflow checking by compiling
1. 4. 2. 8.
unchecked operator
1. 4. 2. 9.
Integral type promotion
1. 4. 2. 10.
Infinit real numners
1. 4. 2. 11.
Check Not-a-Number
1. 4. 3.
Bitwise operators
1. 4. 3. 1.
Bitwise operators in C#
1. 4. 4.
Conditional operators
1. 4. 4. 1.
Conditional operators in C#
1. 4. 4. 2.
Conditional shortcut
1. 4. 5.
Ternary operator
1. 4. 6.
default operator
1. 4. 6. 1.
default keyword
1. 4. 6. 2.
Default value for struct
1. 5.
Flow Control Statements
1. 5. 1.
Flow control statements
1. 5. 2.
if statement
1. 5. 2. 1.
if statement
1. 5. 2. 2.
else branch
1. 5. 2. 3.
Nested if statement
1. 5. 2. 4.
if statement without braces
1. 5. 3.
switch statement
1. 5. 3. 1.
switch statement
1. 5. 3. 2.
Group case statements together
1. 5. 4.
while loop
1. 5. 4. 1.
while loop
1. 5. 5.
do while loop
1. 5. 5. 1.
do...while loop
1. 5. 6.
for loop statement
1. 5. 6. 1.
for loop
1. 5. 7.
foreach statement
1. 5. 7. 1.
foreach loop
1. 5. 8.
break statement
1. 5. 8. 1.
break statement
1. 5. 9.
continue statement
1. 5. 9. 1.
continue statement
1. 5. 10.
return statement
1. 5. 11.
goto statement
1. 6.
class
1. 6. 1.
Classes and Structs
1. 6. 2.
Class creation
1. 6. 3.
Nested types
1. 6. 4.
Members
1. 7.
Field
1. 7. 1.
Class field
1. 7. 2.
Multiple fields declaration
1. 7. 3.
Read only field
1. 7. 4.
Field initialization and default value
1. 7. 5.
Default value for each type
1. 7. 6.
const value
1. 8.
Method
1. 8. 1.
Methods
1. 8. 2.
A demo method
1. 8. 3.
Assign value to local variable
1. 8. 4.
Method overloading
1. 8. 5.
ref and out modifiers and method overloading
1. 8. 6.
Main functions
1. 9.
Constructor
1. 9. 1.
Constructor
1. 9. 2.
Overloading constructors
1. 9. 3.
this() and constructor
1. 9. 4.
Implicit parameterless constructor
1. 9. 5.
Object initialization
1. 9. 6.
Constructors with named parameters
1. 9. 7.
Optional parameters and constructors
1. 9. 8.
static constructor
1. 10.
Parameters
1. 10. 1.
Parameters
1. 10. 2.
Modifiers for parameters
1. 10. 3.
ref modifier
1. 10. 4.
out parameter modifier
1. 10. 5.
Variable length parameter
1. 10. 6.
Optional parameters
1. 10. 7.
Named parameters
1. 11.
Properties
1. 11. 1.
Properties
1. 11. 2.
read only property
1. 11. 3.
Automatic property
1. 11. 4.
Accessibilities of get and set
1. 12.
indexer
1. 12. 1.
Indexer
1. 12. 2.
Your own indexer
1. 12. 3.
Multidimensional indexer
1. 13.
this
1. 13. 1.
this keyword
1. 14.
Partial type
1. 14. 1.
Partial type
1. 14. 2.
Partial method
1. 15.
Finalizer
1. 15. 1.
Finalizer
1. 16.
Inheritance
1. 16. 1.
Inheritance
1. 16. 2.
class hierarchy and casting
1. 16. 3.
base keyword
1. 16. 4.
Overloading and Resolution
1. 16. 5.
Polymorphism
1. 17.
virtual
1. 17. 1.
virtual members
1. 17. 2.
Shadow inherited members
1. 17. 3.
new and virtual
1. 17. 4.
Seal a member
1. 18.
Operator overloading
1. 18. 1.
Operator overloading
1. 18. 2.
Conversion Operator
1. 19.
Special Classes
1. 19. 1.
Abstract class
1. 19. 2.
Static Class
1. 20.
static
1. 20. 1.
Static Members
1. 21.
as is
1. 21. 1.
as operator
1. 21. 2.
is operator
1. 22.
object
1. 22. 1.
object class
1. 22. 2.
ToString method
1. 22. 3.
Class object instance
1. 22. 4.
Struct Instances vs. Class Instances
1. 22. 5.
Object Identity vs. Value Equality
1. 23.
Boxing and unboxing
1. 23. 1.
Boxing and unboxing
1. 24.
var
1. 24. 1.
Anonymous Type
1. 24. 2.
var type variable is static typed
1. 25.
dynamic
1. 25. 1.
dynamic type
1. 25. 2.
ExpandoObject Dynamic Type
1. 25. 3.
dynamic type conversion
1. 26.
typeof
1. 26. 1.
GetType and typeof operator
1. 27.
struct
1. 27. 1.
Creating a struct
1. 28.
Accessor Modifiers
1. 28. 1.
Access modifier
1. 29.
interface
1. 29. 1.
interface
1. 29. 2.
interface is extendable
1. 29. 3.
Explicit interface implementation
1. 29. 4.
virtual interface implementation
1. 29. 5.
interface and struct boxing
1. 30.
enum
1. 30. 1.
enum type
1. 30. 2.
enum backend numeric type
1. 30. 3.
enum backend value
1. 30. 4.
enum type conversion
1. 30. 5.
Build up enum
1. 30. 6.
Flag enum
1. 30. 7.
Is enum value defined
1. 31.
generics
1. 31. 1.
Generic type
1. 31. 2.
Generic methods
1. 31. 3.
Generic type and ref, out
1. 31. 4.
Type parameters
1. 31. 5.
Default generic value
1. 31. 6.
Generic type parameter constraints
1. 31. 7.
Subclassing generic type
1. 32.
delegate
1. 32. 1.
delegate creation
1. 32. 2.
delegate type parameters
1. 32. 3.
Multicast delegate
1. 32. 4.
instance delegate method reference
1. 32. 5.
delegate with generic type
1. 32. 6.
Func and Action
1. 32. 7.
delegate variables
1. 32. 8.
Polymorphic parameters for delegate
1. 32. 9.
delegate return type
1. 33.
event
1. 33. 1.
Event and delegate
1. 33. 2.
C# standard event pattern
1. 34.
lambda
1. 34. 1.
lambda Expressions
1. 34. 2.
Func, Action and lambda
1. 34. 3.
Using outter variable
1. 34. 4.
lambda and iteration variables
1. 35.
try catch finally
1. 35. 1.
try...catch...finally
1. 35. 2.
catch statement
1. 35. 3.
finally statement
1. 36.
using statement
1. 36. 1.
using statement
1. 37.
Throw exception
1. 37. 1.
Throw exception
1. 37. 2.
Rethrow exception
1. 37. 3.
System.Exception
1. 37. 4.
Frequent used exception types
1. 38.
namespace
1. 38. 1.
What is namespace
1. 38. 2.
namespace hierarchy
1. 38. 3.
Full qualified type name
1. 38. 4.
using statement and namespace
1. 38. 5.
namespace scope
1. 38. 6.
Partial qualified name
1. 38. 7.
Hidden types
1. 38. 8.
Alias namespace
1. 38. 9.
global namespace
1. 39.
nullable
1. 39. 1.
nullable type
1. 39. 2.
nullable type conversion
1. 39. 3.
Operators for nullable type
1. 39. 4.
?? operator
1. 40.
Anonymous type
1. 40. 1.
Anonymous type
1. 40. 2.
Properties and anonymous type
1. 41.
Extension method
1. 41. 1.
Extension method
1. 42.
Preprosessor Directives
1. 42. 1.
Preprosessor directives
1. 42. 2.
Conditional compilation
1. 42. 3.
Conditional attributes
1. 43.
unsafe code
1. 43. 1.
unsafe code
1. 44.
Xml Documentation
1. 44. 1.
Xml Documentation
1. 44. 2.
Standard Xml documentation tags
1. 45.
Debug Trace
1. 45. 1.
Debug and Trace Classes
1. 45. 2.
TraceListener
1. 45. 3.
Fail() method
1. 45. 4.
Assert
«
C# Book
Introduction
»
java2s.com
|
Contact Us
|
Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.