Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Ehsan Sajjad
The Lounge - CodeProject
How many here remember when it first came out? I saw it when it first showed in the "Cinerama" in Fresno California. If you think hiring a professional is expensive, wait until you hire an amateur! - Red Adair Before anyone suggests that it was my car, keep in mind that a) I live in Texas, b) my car is white, and c) my car is much faster. ".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire.
Implement Equality for Reference Types in C#
Implement Equality for Reference Types in C# Please Sign up or sign in to vote. This post outlines why we would implement Equality for a Reference Type and how we can do that.
The Lounge - CodeProject
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer. The #1 rule is: Be respectful of others, of the site, and of the community as a whole. 2.
The Lounge - CodeProject
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer. The #1 rule is: Be respectful of others, of the site, and of the community as a whole. 2.
The Lounge - CodeProject
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer. The #1 rule is: Be respectful of others, of the site, and of the community as a whole. 2.
First .NET Core Console Application using Command Prompt
In this post, we will create our very first console application in , we will see how we can build .NET Core based applications without using any . We will be using Command Line to create, build and run the application.
Building First .NET Core Console Application using Command Prompt in .NET Core 2.0
In this post, we will create our very first console application in , we will see how we can build .NET Core based applications without using any . We will be using Command Line to create, build and run the application.
Building First Console Application using Command Prompt in .NET Core 2.0
This is a step by step guide for beginner on how to install .NET Core 2.0 and create a Console Application without any IDE using Command Prompt/PowerShell In this post, we will create our very first console application in .NET Core, we will see how we can build .NET Core based applications without using any IDE or Visual Studio. We will be using Command Line to create, build and run the application.
Implement Equality for Value Types in C#
Implement Equality for Value Types in C# This post is a guide for beginners on how to implement Equality for a Value Type and why should you implement it This post is to focus on implementing Equality in Value Types i.e. overriding Equality behavior for our own implemented Value Types which is basically defining that how to decide two objects of a type are equal or not.
Beginners Guide for implementing AJAX CRUD Operations in Grid using JQuery DataTables in ASP.NET MVC 5
In this post, I will be addressing this problem and we will learn that how can implement CRUD using JQuery DataTables in one page without any full page reloads. I frequently come across questions on online forums like StackOverflow in which the questioners are able to create CRUD operations for their entity which is a normal form post, but they struggle implementing the CRUD via ajax so that page does not reloads completely for better User Experience.
AJAX CRUD in Grid using JQuery DataTables in ASP.NET MVC 5
AJAX CRUD in Grid using JQuery DataTables in ASP.NET MVC 5 In this post, I will be addressing this problem and we will learn that how can implement CRUD using JQuery DataTables in one page without any full page reloads.
The Lounge - CodeProject
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer. The #1 rule is: Be respectful of others, of the site, and of the community as a whole. 2.
The Lounge - CodeProject
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer. The #1 rule is: Be respectful of others, of the site, and of the community as a whole. 2.
Equality Operator (==) Problem with Inheritance and Generics in C#
In the previous post, we learned that == operator does not works for non-primitive value types unless we overload the operator for that value type, and we saw how we can overload the equality operator to enable == operator comparison for non-primitive value types. We also compare the == operator and Object.Equals method to see how their behavior differs for primitive types, value types and reference types.
Grid with Server Side Advanced Search using JQuery DataTables in ASP.NET MVC 5
In the last two posts about implementing in ASP.NET MVC, we talked about how we can create a grid like we had in ASP.NET webforms using JQuery plug in, then in the second post, we saw how we can enhance the performance of our gird by implementing the sorting, searching and paging, as in the first post we implemented a gird but the problem was all rows were getting rendered on the page as HTML when page is first time loaded and filtering, paging and sorting was being done on the client side...
GridView with Server Side Advanced Search Implementation using JQuery DataTables in ASP.NET MVC 5
GridView with Server Side Advanced Search Implementation using JQuery DataTables in ASP.NET MVC 5 CodeProjectBackground:In the last two posts about implementing GridView in asp.net mvc, we talked how we can create a grid like we had in asp.net webforms using JQuery DataTables plugin, then in the second post we saw that how we can enhance the performance of our gird by implementing the sorting, s CodeProject In the last two posts about implementing GridView in asp.net mvc, we talked how we can...
Implement Grid with Server Side Advanced Search using JQuery DataTables in ASP.NET MVC 5
Implement Grid with Server Side Advanced Search using JQuery DataTables in ASP.NET MVC 5 This article demonstrates how we to implement advanced search on a gird using JQuery DataTables in asp.net mvc 5 CodeProject In the last two posts about implementing GridView in asp.net mvc, we talked how we can create a grid like we had in asp.net webforms using JQuery DataTables plugin, then in the second post we saw that how we can enhance the performance of our gird by implementing the sorting,...
Equality Operator (==) and Value Types in C#
This article is in the continuation of series of articles regarding how Equality works in .Net, the purpose is to have the developers more clear understanding on how .Net handles equality for different types. We have already seen equality for primitive types, reference types works, we also discussed separately how equality works differently for String type. Following are some points which we were able to understand until now.
Story of Equality in .Net - Part 6
We will be looking at String type in this post that how Equality works for it. You might be aware that for strings the equality operator compares values not references which we had seen in the first post of this series. It is because String has overridden the implementation of Equals to behave in this manner. We will investigate how == operator and Object.Equals method behave for equality checking.
How to Register/Specify Custom Directories for Views in Razor ASP.NET MVC
In ASP.NET MVC by default, when we create an application, our Views reside in Views directory for our Controller actions. For example, by default it creates Home controller with Index action, and if we see in Solution Explorer in Views directory, we can see directory Views -->> Home --> Index.cshtml and we have its action like this: and we have this action's Views in Views folder.
Story of Equality in .NET - Part 5
This article is in the continuation of a series of articles regarding how Equality works in .NET and it is specific to how Equality operator works for reference types. I hope that after reading the previous posts, you now have a better understanding of how the C# equality operator works for primitive types like , , , etc.
Grid View with Server Side Filtering, Sorting and Paging in asp.net mvc 5
One thing to notice in the previous post is that all the features provided by the plugin are client side which means that all the data is loaded in the page first and then the plugin handles the data on client side for searching, pagination and sorting which is fine if the result sets coming are not very big, but it can cause problems if the table is too big or the data is not that much but grows gradually as applications is used, so if that is the case this way of creating the grid would...
GridView with Server Side Filtering, Sorting and Paging in ASP.NET MVC 5
In the previous post (Beginners Guide for Creating GridView in ASP.NET MVC 5), we talked about how we can achieve a -type functionality in ASP.NET MVC similar to ASP.NET webforms. We saw how easy it was to implement a grid using jQuery datatables plug in which provides vital features such as searching, sorting and pagination.
Beginners Guide for Creating GridView in ASP.NET MVC 5
In this post, we will be seeing how we can create a in ASP.NET MVC, same like we have in ASP.NET web form. There are many third party both server side and client side soltuions are available which provide all the essential functionalities that we have in web forms which include searching, sorting and paging, etc. It totally depends on the requirements of specific application if the search is needed client side or server side, same for the other functions.
Story of Equality in .NET - Part 4
This article is the continuation of the previous three articles regarding how Equality works in .NET, the purpose is to give developers a more clear understanding on how .NET handles equality for types. I hope that after reading the previous three posts, you have now understood how the .NET framework deals with the Equality using the method and for most of the value types and for few of Reference types using . In this post, we will be discussing the C# equality operator provided by Microsoft.
Story of Equality in .NET - Part 3
In this article, you will learn about IEquatable interface in .NET and how it solves some of the equality problems for value types. you can see that method has two problems. One thing is that it lacks strong typing and for value types, boxing needs to be done. In this post, we will look at the interface which provides a solution to these problems. The generic exists for solving a slightly different problem with method. The method on type takes parameter of type .
Story of Equality in .NET - Part 2
In this post, we will see how smartly .NET handles equality and comparison out of the box. This means that you will be able to understand how .NET handles some of the issues that we discussed in the previous post. If you remember from my previous post, there are 4 methods in class which are provided by .NET Framework for the purpose of equality checking. Each one is designed for different scenarios but their purpose is the same which is to check equality of two objects.
Story of Equality in .NET - Part 1
Few months back i followed a very interesting course on Pluralsight by Simon Robinson about Equality and Comprison in .Net which is a great course indeed that would help developers to understand that how equality and comparisons work in .Net, So i thought to shared the insights of it what i have learned from the course, hope this will help others to understand the equality behavior and in depth understanding of how .Net handles it.
Get First N digits of a Number
This snippet return the first N digits of a number without converting the number to string. I was asked by my senior colleague to make a method which takes two arguments as input, first the number and second the number of digits to be returned from the first argument number, but the restriction was not to convert it to string.
OOP Difference between Shadowing and Overriding
There is a major difference in shadowing and overriding which is normally when we override a virtual method in derived class and create instance of derived class and then if we hold reference to derived class object as base class object, and call that member, it always calls derived class implementation which is supposed to happen, but in shadowing the case is different, if for the same virtual member we shadow it in the derived class using new keyword and we call the implementation as above...
How to specify in which folder the View pages reside in asp.net mvc
In asp.net mvc by default when we create application, our Views reside in Views directory for our Controller actions.
asp.net mvc Adding Custom direcotry for Views (asp.net mvc How to specify which folder the View pages reside in?)
The same is the case for partial view when we call return PartialView() it first looks in the respective controller's Views/Home directory in the case of HomeController and in case of failure it looks in the View/Shared folder. Views/Home/Partials and Views/Shared/Partial then we have to tell the ViewEngine to look in that directory as well by writing the following code in Gloabl.asax file in Application_Start event.
Bind Enum to DropdownList in asp.net mvc
Sometimes we have scenario while development where we need to populate dropdownlist from Enum. There are a couple of ways to do it. But every way has it's pros and cons. One should always keep in mind theandprinciple while writing code.
Image ActionLink HTML Helper in ASP.NET MVC
CodeProject For creating a link in ASP.NET MVC, we use Link Extension provided by the MVC framework. For creating a simple anchor tag, we use helper which generates anchor tag for us.
Asp.net mvc Async File Uploading using JQuery
In this post, you will learn how to upload file in asp.net mvc without reloading the whole page or wihtout refreshing the whole page instead we will update specific portion of page which is normally said aync postback in webforms terms. In order to make the AJAX style file uploads work, we need to to post to an iFrame. We're going to position an iFrame off the page to hide it and then post to it. We'll return a partial view to the page and append it in some html container.
Mapping ViewModel to Model in asp.net mvc using implicit operator in C#
In ASP.NET MVC we have three important things in which we are moving all the time which is Model, View and Controller. Sometimes we want specific information of model to be passed from View to action, but if we use the Model classes that are mapped to our database tables make things messy, as all the model is round tripping from View to action or vice versa. Consider the following model class which is mapped to the user table in my database.
Custom Validation Message Helper in asp.net mvc
CodeProjectAs i wrote earlier a post about Creating Custom Html Helpers in asp.net mvc which emphasized on how we can write custom html helper extensions in asp.net mvc according to the need, so that we can reuse them in the whole application, instead of writing plan html in View.
Difference between static and sealed class in c#
A static class is very similar to non-static class, however there's one difference: a static class can't be instantiated. In different words, you can not use the new keyword to make a variable of that class type. As a result of there's no instance variable, you access the static class members by using class name.
Implementing Repository pattern and Dependency Injection in ADO.net using Generics in C#
CodeProjectNowadays i am trying to learn different design patterns in object oriented paradigm that are pretty useful to implement generic solutions for different scenarios, few weeks back for a job hunt i got an assignment to do which was a web application which would interact with database, so i took it as a challenge and decided to make it loosely coupled using design patterns which were applicable in that scenario.
Misconceptions regarding Pass By Value and Pass By Reference in C#
It is a common question which is asked by interviewers in interviews that "What is Pass By Value and Pass By Reference" or "What is the difference between Pass By Value and Pass By Reference". Most of the beginner level developers and also many of intermediate level developers have misconception on it and they answer it wrong during interview.
Story of Pass By Value and Pass By Reference in C#
It is a common question which is asked by interviewers in interviews that "What is Pass By Value and Pass By Reference" or "What is the difference between Pass By Value and Pass By Reference". Most of the beginner level developers and also many of the intermediate level developers have misconceptions about it and they answer it wrong during interviews.
Scope of for loop at declaration of variable
I faced this strange behavior when i was coding. so i ask it here What is the Scope of for loop when declaring variables? This means both are not in same scope. But this code does not compile. This means the in middle of loops has the same scope of first loop and the second loop. But how can in two for loops have different scope but the same scope with middle . because currently i see them in same level. I know the second code does not compile.
Meaning of Intel Processors suffixes
The processor number is one of several factors, along with processor brand, specific system configurations, and system-level benchmarks, to be considered when choosing the right processor for your computing needs. A higher number within a processor class or family generally indicates more features, but it may be more of one and less of another. Once you decide on a specific processor brand and type, compare processor numbers to verify the processor includes the features you are looking for.
Take the greater of two nullable values
I want to take the biggest, non-null value, such that if both values are null, the result is null. What's the simplest way to return the greater value, which also accounts for the possibility of null values?
Eric Lippert and Neal Gafter C# puzzle
I believe that problem is caused by static field initalizator. I've spotted that new thread is started only when is done (despite is called) - so I suppose that CLR blocks other threads to avoid concurrent access / double field initalization. To sum up: Newly-created thread is not started by CLR to avoid concurrent access, but main initalization thread waits for child thread to be done what means deadlock.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Ehsan
Contact Ehsan, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack