Category: C# Basic

List of C# basic interview questions for freshers with best answers and notes asked in software job interviews. | Only Real

What is method overriding in C# inheritance? Explain with real time example

Method overriding in c# with real time example – In c# interview, we need to explain overriding definition with program example and when to use method overriding in c# inheritance . We will explain method overriding with real time example for this interview question. Answer: Method overriding is a feature that allows to invoke child…

Read the full article

Up-casting and Down-casting in C# Inheritance

Answer: Explanation of Up-casting and Down-casting in C# inheritance with program example C# Up-Casting Assignment of derived class object to a base class reference in C# inheritance is known as up-casting. As, Up-casting is implicit any explicit typecast is not required. For example, in below program in main() method assignment of derived class “Circle” object…

Read the full article

What is difference between class and structure in C Sharp? Also, tell similarities between them.

Answer of this technical C# interview includes difference between class and structure in c# programming and similarities between them. Answer Similarities between class and structure in C# In C# language, classes and structures both can have Class Constructor, Private field, Methods , Properties and Event. Both can support interfaces.   Difference between class and structure…

Read the full article

Explain C# Abstract class constructor with Real Time Example

Answer includes C# abstract class constructor with real time example program. An interviewer can also ask it as, can abstract class have constructor in C# program ? If yes, why do we use constructor in abstract class? etc. Answer: Yes, an abstract class can have a constructor, even though abstract class cannot be instantiated. An abstract…

Read the full article