dipendrashekhawat / oops-concepts

OOPS Concepts using C# as programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OOPS Concepts in C#

This repo is for demonstrating OOPS concepts in C# programming. I will update it with more examples.

You can ⭐ it, would be useful when brushing up OOP basics.

Contents

  1. Try Catch Finally blocks
  2. Interface, Classes Inheritance scenario
  3. Polymorphism
  4. Static Members
  5. Abstract Classes/Methods
  6. Interfaces

Compile-Time Polymorphism

Polymorphism means same method name used in but different forms. It is also known as method overloading, early binding. It works on:

  1. Number of parameters
  2. Data type of parameters
  3. Return Type of the method is never comsidered for polymorphism.
int sum (int a, int b);
string sum (int a, int b);

var x = sum(2,5); // this will result in error as compile wil not be sure which method to call.

About

OOPS Concepts using C# as programming language


Languages

Language:C# 100.0%