Delegates are one of the most used features of C#. It allows you to pass a function as of function pointer. It is kind of same as function pointer of C++. Put simply, delegates are the same as a function pointer of C ++. It refers to another function. As noted in Microsoft official documentation:ContinueContinue reading “C# Basics: Delegates”
Tag Archives: CSharp
What is the Extension Method in C#?
Read full article on Infragistics blog I often get questions about the Extension Method in C#. The Extension Method was introduced in C# Version 3.0. and allows us to add functionalities in an existing class without modifying it, extending it, or re-compiling it. Essentially, the Extension Method allows us to add a new method toContinueContinue reading “What is the Extension Method in C#?”
C-Sharp Basics: What is Checked and Unchecked operations
You may have come across questions, What is checked and unchecked primitive operations? How to handle overflow in C-Sharp? Does CLR handles overflow or developers? So let us start with understanding a program. Consider the code listed below: On running you will get 44 as the output. There is one serious observation about theContinueContinue reading “C-Sharp Basics: What is Checked and Unchecked operations”
Exception Filters in C-Sharp 6.0
So far we deal with the Exceptions as below. As you see in the following code snippet, we are catching the exception and displaying the error message. Challenge in the above snippet is that you cannot apply filter to the exception. Of course you can have if-else statement inside the try catch block but itContinueContinue reading “Exception Filters in C-Sharp 6.0”
Using AutoMapper : Getting Started
Read full article on Falafel blog I have often seen developers use the LINQ SELECT statement to create a new instance of one class from an existing instance of another class. There are many scenarios when you may have to do this, for example: Creating the domain class instance from the entity class instance CreatingContinueContinue reading “Using AutoMapper : Getting Started”
Video : Getting started with the Automapper in C-Sharp
This video will help you in getting started with the Automapper. Please give feedback in comment to improve further https://www.youtube.com/watch?v=KJ_sM8WdDGM&feature=youtu.be
Understanding IEnumerable and IQueryable in C#
I see developers are not that confident about usage of the mentioned interfaces. In this post, I am going to discuss basic differences among IEnumerable and IQueryable and in which scenario to use what
The call is ambiguous between the following methods in C#
the call is ambiguous between the following methods in C# can be resolved as easily as given discussed above.
Convert List to List using ConvertAll in C#
I see many developers convert one list to another list using foreach. It is ok and get the job done but there is better way to convert one list to another list using ConvertAll(); Just to explain you scenario better, let us assume you got two classes as below. InternalStudent class is representing Student classContinueContinue reading “Convert List to List using ConvertAll in C#”
Video: is and as operator in C-sharp
In this video you will learn about is and as operator in C-sharp http://www.youtube.com/watch?v=fsukGhg1yJk&feature=youtu.be