⚠️ Notice: This page contains archived content and may reference older versions of C# or .NET. For the latest tutorials, updated examples, and best practices for C# 12 and .NET 8, please visit the latest tutorials ⚠️
 

C# Polymorphism Practice Question

Qu 1. Write a program of function overloading that has a function Convert() that accepts a value in parameter and convert them into string and print on screen.
Hint: Convert(int num);
Convert(Double num);
Convert(Fload num);
Qu 2. Write a program using Virtual and Override keyword that does the following tasks.
  1. A virtual function Engine() that has basic properties of engine like Power of engine, RPM, no of Cylinder etc.
  2. This function should be overridden in child class according to function.