KEMBAR78
An Introduction to C# and .NET Framework (Basic) | PPT
An Introduction to C#
and
the .NET Framework
Powered by Khubaib
Web Trainer at Ewiglife Cloud Technologies
Recursive Method Call
 A method can call itself.
 Access Specifier
 Return type
 Method name
 Parameter List
 Method body
Recursive
Arrays
 An array stores a fixed-size sequential collection of
elements of the same type.
 Declaring Arrays
 datatype[] arrayName;
Arrays Program
Isn’t?
Array program
Inheritance
 One of the most important concepts
 Inheritance allows us to define a class
in terms of another class
 makes it easier to create and maintain
an application
 Base and Derived Classes
Example
C++ logic
In C we had to code our own bugs. In C++ we can inherit them.
C# - Polymorphism
 The word polymorphism means
having many forms
 'one interface, multiple functions'.
 Static (In static polymorphism, the
response to a function is determined
at the compile time)
 Dynamic(In dynamic polymorphism,
it is decided at run-time.)
Static Polymorphism
 C# provides two techniques to implement static
polymorphism.
Function overloading
Operator overloading
 Function Overloading
 You can have multiple definitions for the same function name in the
same scope
Example function overloading
Dynamic Polymorphism
 C# allows you to create abstract classes that are used to
provide partial class implementation of an interface
 Abstract classes contain abstract methods
 The derived classes have more specialized functionality.
 rules about abstract classes
 You cannot create an instance of an abstract class
 You cannot declare an abstract method outside an abstract
class
 When a class is declared sealed, it cannot be inherited,
abstract classes cannot be declared sealed.
Example
Polymorphism Fact
 A dog, a spider, and a human can all walk at a rate of
speed. Everyone knows this. But, when talking about the
specifics of how they walk, each implementation is
different. A spider has 8 legs and will 'scurry' around very
quickly ( relative ). A dog has 4 legs and will leap and
jump and run around. A human has 2 legs and will place
one in front of the other, enabling them to walk.

An Introduction to C# and .NET Framework (Basic)

  • 1.
    An Introduction toC# and the .NET Framework Powered by Khubaib Web Trainer at Ewiglife Cloud Technologies
  • 2.
    Recursive Method Call A method can call itself.  Access Specifier  Return type  Method name  Parameter List  Method body
  • 4.
  • 5.
    Arrays  An arraystores a fixed-size sequential collection of elements of the same type.  Declaring Arrays  datatype[] arrayName;
  • 6.
  • 7.
  • 8.
  • 9.
    Inheritance  One ofthe most important concepts  Inheritance allows us to define a class in terms of another class  makes it easier to create and maintain an application  Base and Derived Classes
  • 10.
  • 11.
    C++ logic In Cwe had to code our own bugs. In C++ we can inherit them.
  • 12.
    C# - Polymorphism The word polymorphism means having many forms  'one interface, multiple functions'.  Static (In static polymorphism, the response to a function is determined at the compile time)  Dynamic(In dynamic polymorphism, it is decided at run-time.)
  • 13.
    Static Polymorphism  C#provides two techniques to implement static polymorphism. Function overloading Operator overloading  Function Overloading  You can have multiple definitions for the same function name in the same scope
  • 14.
  • 15.
    Dynamic Polymorphism  C#allows you to create abstract classes that are used to provide partial class implementation of an interface  Abstract classes contain abstract methods  The derived classes have more specialized functionality.  rules about abstract classes  You cannot create an instance of an abstract class  You cannot declare an abstract method outside an abstract class  When a class is declared sealed, it cannot be inherited, abstract classes cannot be declared sealed.
  • 16.
  • 17.
    Polymorphism Fact  Adog, a spider, and a human can all walk at a rate of speed. Everyone knows this. But, when talking about the specifics of how they walk, each implementation is different. A spider has 8 legs and will 'scurry' around very quickly ( relative ). A dog has 4 legs and will leap and jump and run around. A human has 2 legs and will place one in front of the other, enabling them to walk.