Interface Interview Question in C#

Below are the interface interview questions in C# for beginners and experienced developers What is the use of interface? Interface mostly used for following reasons: Specifying contract Multiple inheritances Loosely coupled code Specifying contract – Interface is used to define a contract in the application, so that the other application should follow the contract in order to execution. In other words, we can say that … Continue reading Interface Interview Question in C#

Interface

Introduction In object-oriented programming, An interface is a collection of abstract methods (without body implementations), properties, indexers, and events. It is used to define the behavior that can be implemented by the classes. It enforces classes to implement all the members of it. For example, suppose we have a Truck class and a Car class. Each of these classes should have an action start engine, … Continue reading Interface

Polymorphism Interview Questions

Below is the list of Polymorphism Interview Questions for interview preparations for beginners and experience professional What is Polymorphism in C#? Polymorphism is one of the main pillars of object-oriented programming (OOP), it allows the programmer to change the object behavior based on object creation or way the is being called. It also provides the facility to inject different features to the existing functionality or … Continue reading Polymorphism Interview Questions

Polymorphism

Polymorphism meaning Polymorphism is a Greek word constructed from two words, poly and morph. The word poly means many and morph means changing forms. polymorphism means having many forms. In computer science, It provides the ability to object to change the forms based on context usage. “Polymorphism is an object-oriented programming concept that refers to the ability of a variable, function, or object to take … Continue reading Polymorphism

Inheritance

What is inheritance? Inheritance is the process of deriving quality from the parent. In object-oriented programming (OOP), it is the process of creating a class from another class called a base class. So that derived class(child class) can acquire the property, methods of a base class. Derive (a quality, characteristic, or predisposition) genetically from one’s parents or ancestors. We can say that inheritance would be … Continue reading Inheritance

Constructors Interview Questions

Why we need a constructor in object-oriented programming? The purpose of Constructor is to initialize the values of data members or to perform some logic when an instance of the class gets created. Yes, we can achieve this without constructor but for that, we need to make explicit calls and chances that someone might forget to call method to initialize the values before creating an … Continue reading Constructors Interview Questions

Constructors

What is constructor with example Constructors are special methods inside a class that is called when an object is instantiated. In other words, when we create an instance of the class using the “new” keyword, the constructor gets called automatically and initializing the variables of that class. Example: Suppose we have a “Car” class as mentioned below Now if we want to initialize “Car” class … Continue reading Constructors

Encapsulation

In object-oriented programming people often get confused with encapsulation and abstractions. Encapsulation in programming is the process of encapsulating data members and data methods into a single unit to hide it from another class. Encapsulation is a strategy used as part of abstraction. It refers to the state of objects – objects encapsulate their state and hide it from the outside; outside users of the … Continue reading Encapsulation

Abstraction

Introduction In Simple terms, Abstraction is the process of hiding the irrelevant information in a higher degree and only showing essential thing to the user. It focusses on what the thing does instead of how it does. For example, a mobile phone to make the call we don’t need to know how our call gets connected to another phone, we just need to dial number … Continue reading Abstraction

What are class and object in OOP?

In object-oriented programming (OOP), object and class play an essential role; In fact, OOP is based on object and class. Definition of Objects An object is any real-time entity which has some properties (State) and can perform some task (Behaviour). For example, Mobile is an object; it has some properties (State) like length, colour, weight, etc. and it perform some task (Behaviour) like call, message, etc. In programming, objects … Continue reading What are class and object in OOP?

machine learning with .net, machine learning tutorial, machine learning online course, machine learning course, machine learning step by step guide, machine learning steps for beginners

Machine Learning – Understanding and Introduction

Machine learning(ML) is the process of training machines by feeding data to an algorithm. As a result, machines can make smart decisions or good predictions. This prediction can be improved by experience and data.ML is a branch of artificial intelligence (AI). This enables the ability of computers to learn without being explicitly programmed. So, that machine can carry out certain tasks. For example, email filtering … Continue reading Machine Learning – Understanding and Introduction

Lambda Expressions – Interview Question

Collection of typically Interview Questions on lambda expression for interview preparation. you can also read more about Lambda expression Alternatively, you can also test your knowledge by an online free quiz for a lambda expression. Interview Question: What is Lambda expression? Answer: Lambda Expressions are nameless functions given as constant values. They can appear anywhere that any other constant may, but are typically written as a … Continue reading Lambda Expressions – Interview Question

Lambda Expressions

Introduction In the earlier post, we talk about anonymous methods, we had seen that by using anonymous methods, we can define a method without providing a name to the method, in addition to it, we were also not required to specify the access specifier and the return type of the method. Lambda expressions are a further shortcut to writing anonymous methods. To understand more let’s … Continue reading Lambda Expressions

C# Anonymous methods Interview Question

Collection of typically Interview Questions on anonymous methods for interview preparation. you can also read more about anonymous methods. Alternatively, you can also test your knowledge by an online free quiz for anonymous methods. Interview Question: What is Anonymous method? Answer: Anonymous methods were introduced into C# 2 as a way of creating delegate instances without having to write a separate method. They can capture local … Continue reading C# Anonymous methods Interview Question

Generic Delegates (Action, Func, Predicate) – Interview Questions

Collection of typically Interview Questions on generic delegates for interview preparation. you can also read more about delegates, callbacks, Multicast Delegates, Generic Delegates. Alternatively, you can also test your knowledge by an online free quiz for delegates, multicast delegate, generic delegates. Interview Question: What are Generic Delegates in C#? Answer: The Func , Action and Predicate are the three generic delegates. We can make use of all these three predefined … Continue reading Generic Delegates (Action, Func, Predicate) – Interview Questions

Func, Action & Predicate – Generic Delegates

Introduction In an earlier post, we have discussed delegates, multicast delegate. In this article, I am going to discuss the Generic Delegates in C#. In .NET Framework 3.5, C# introduces Generic delegate which allows to invoke the delegates without defining the delegate instance. To understand the Generic Delegates, we should have the basic knowledge of Delegates. I would recommend checking earlier posts related to delegates, … Continue reading Func, Action & Predicate – Generic Delegates

Delegates Interview Questions

Collection of typically Interview Questions on delegates for interview preparation. you can also read more about delegates, callbacks, and Multicast Delegates. Alternatively, you can also test your knowledge by an online free quiz for delegates and multicast delegate. Interview question: What is a delegate? Answer: A delegate is a type-safe function pointer. Using delegates you can pass methods as parameters. To pass a method as … Continue reading Delegates Interview Questions

Delegates

Introduction When a head of state dies, the President of the United States typically does not have time to attend the funeral personally. Instead, he dispatches a delegate. Often this delegate is the Vice President, but sometimes the VP is unavailable, and the President must send someone else, such as the Secretary of State or even the First Lady. He does not want to “hardwire” … Continue reading Delegates

Extension Methods

Introduction Extension Methods allow user to add additional feature or methods to existing class without creating a new derived type. Before diving into extension method, lets understand why we use extension method in c#? Example Suppose that there is a class with n number of methods, and you want to add more methods into it. you can add Extension methods using below two approach: You … Continue reading Extension Methods

Exception Handling in C# – Part II

Introduction In the previous post, we have covered basics of exception handling, the purpose of exception handling, types of error, list of system exceptions, and some examples of run time error. In this post will cover ways to handle the exceptions in C#, multiple exceptions catches and writing custom exceptions below is the index: How to handle Exception in C# C# provides built-in support to … Continue reading Exception Handling in C# – Part II

Interview Questions: Multiple Catch Block in C#

Introduction In C#, You can use more than one catch block with the try block to handle different types of exceptions means each catch block is used to handle different types of exceptions. For example: Below example, we have added multiple catch block, so let say if the user has entered string value in first input then control will be passed to the FormatException catch … Continue reading Interview Questions: Multiple Catch Block in C#