C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Tags
No tag found
Content Filter
Articles
Videos
Blogs
Resources
News
Forums
Interviews
Complexity Level
Beginner
Intermediate
Advanced
Refine by Author
[Clear]
Sourav Kayal(2)
Bechir Bejaoui(2)
Mahesh Chand(2)
Mike Gold(2)
Praveen Raveendran Pillai(1)
Tahir Ansari(1)
Munib Butt(1)
Ritesh Sharma(1)
Abhishek Bhat(1)
mahmoud mahmoud(1)
Amit Choudhary(1)
Ashish Jaiman(1)
Rikam Palkar(1)
Mahalasa Kini(1)
Shakti Saxena(1)
Abhishek Yadav(1)
Kirtan Patel(1)
Prasad H(1)
Alpesh Maniya(1)
Ahmad Mozaffar(1)
Arunava Bhattacharjee(1)
Kailash Chandra Behera(1)
Lajapathy Arun(1)
Dipen Lama(1)
Resources
No resource found
Sorting with IComparable in C#
Nov 14, 2024.
Learn how to implement the IComparable interface in C# to customize sorting behavior for objects. Explore sorting techniques, comparisons, and examples to efficiently order data in collections like lists and arrays.
Understanding the IComparable in C#
Aug 09, 2023.
IComparable is a C# interface for comparing objects within the same type, enabling sorting based on specific criteria. Explore its definition, usage, and benefits in facilitating object comparison and sorting.
Using The IComparable And IComparer Interface In C#
May 18, 2020.
One of the most used functionalities in our C# classes is the ability to sort the different instances of a class. This is mostly done when we create a generic List of our class type and next, we want to sort our class based on some condition. Today, we will see how this is done in our C# classes
Comparing Complex Type With ==, Equals, IEquatable and IComparable in C#
Jun 20, 2014.
In C#, when comparing complex types (objects) for equality and ordering, you have several options and methods available, each with its own purpose and behavior. Here's an overview of how to compare complex types using ==, Equals, IEquatable, and IComparable.
Important Interface in .NET: Work With IComparable Interface
Feb 05, 2014.
In this article we will discuss the IComparable interface in the .NET class library.
Using IComparable and IComparer to compare objects in VB.NET
Nov 10, 2012.
The .Net framework and especially the System.Collection namespace provides us two built in interfaces witch are IComparable and IComparer interfaces in order to compare two objects.
Using IComparer IComparable for Sorting in WPF
Jan 27, 2011.
Implementation of IComparable in WPF. Here, we implement the CompareTo method and sort the Emp objects based on Age property.
How to use IComparable in C#
Jul 09, 2010.
This code sample shows how to use IComparable in C#.
Implementing an IComparable interface to a Class
Mar 31, 2010.
Here I have given an example of how to sort an Person class on the basis of its attribute by implementing IComparable interface.
Using IComparable and IComparer to compare objects
Apr 30, 2008.
This article informs you that the .Net framework and especially the System.Collection namespace provides us two built in interfaces witch are IComparable and IComparer interfaces that enables us compare and sort objects.
Sorting Object Using IComparer and IComparable Interfaces
Mar 01, 2002.
The System.Collections namespace contains interfaces and classes that define various...
IComparable Vs IComparer Interface In C#
Jun 22, 2020.
These 2 interfaces are basically use to sort user defined object collections
Sort Array List Of Objects In C# (IComparable And IComparator)
May 11, 2020.
In this article you will learn how to sort array List Of Objects In C# (IComparable And IComparator).
IComparable, IComparer And IEquatable Interfaces In C#
Oct 27, 2015.
In this article you will learn about IComparable, IComparer And IEquatable Interfaces In C#.
IComparable Interface and Its Use in Sorting Types
Sep 03, 2014.
This article explains what the IComparable interface is, how to do sorting on simple types (such as int, string, float, and so on) and how to sort Complex Types using the IComparable interface.
How and when to Use Interfaces like IComparable
Sep 10, 2010.
This article is targeted for the people who don't know how to use Interfaces .
Designing Sortable Collections using IComparable
Nov 21, 2005.
.NET Framework Class Library provides several interfaces to support additional functionality in collections such as ICollection, IList, and IComparable. IComparable interface is used to support the sorting in collections.In this article, I will discuss how to use IComparable interface to design sortable arrays.
IComparable: Under the Hood
Sep 21, 2001.
We now calling Array.Sort() on C# Types such as int, char, string will automatically do sorting based on that type.
C# Comparison Fundamentals: Best Practices and Tips
Jun 11, 2024.
Comparison operations are a fundamental aspect of programming in C#. Whether you're comparing primitive types, strings, or objects, or handling null values, understanding the nuances of comparison can enhance both the performance and readability of your code.
Three Popular C# Interfaces
Jan 09, 2018.
In this article, you will learn about the most common interfaces in the C# Libraries that you can use to create robust classes and objects.
All About Sorting in C#
Sep 04, 2014.
In this article you will learn how to use IComparable<> or IComparer<> and how it can be replaced by LINQ.
Important Interface in .NET: Work With ICloneable Interface
Feb 22, 2014.
In this article we will learn the concepts of the ICloneable interface in the .NET class library.
Interface in C#
Feb 27, 2013.
The .NET Framework provides many interfaces for various purposes. Some of the commonly used interfaces are IComparable, IEquatable, IConvertible, ICloneable and IFormattable.
Dynamically Sorting Object At Runtime Using Reflection C#
Apr 18, 2012.
Dynamic sorting of objects at runtime using reflection in C# involves leveraging the power of reflection to examine object properties and sort them based on specific criteria without having to write separate sorting logic for each property. By using reflection, developers can create generic and flexible sorting mechanisms that work with various object types and properties.
Programming in C#: Understanding the SortedDictionary Class
Jun 21, 2007.
This article illustrates a powerful collection in C#, the SortedDictionary. In the article we will discuss two ways to sort key-value pairs: using an IComparer object and using IComparable keys.
Sorting Collection of Custom Type using Generic
Jul 06, 2006.
This article shows a simple and easy way to sort the business object collection using generic.
Binding an ArrayList with DataGrid Control
Oct 24, 2005.
I have seen several questions on how to bind an ArrayList with data-bound controls such as a DataGrid. In this step by step tutorial, I will show how to create an ArrayList of objects and bind it to a DataGrid control.
Yahtzee Program Using C#: Part II
Jan 31, 2002.
This is an update of the Yahtzee program for VS 2005. Included in this version is a Game Reset and a High Score Tracker. The Top Ten High Scores are tracked using an Array with sortable components. In this article we will talk about the IComparable interface used to make an object stored in an array sortable.