This very simple class allows sorting of date when the object is added to a collection, such as an Array List.
using System;
using System.Collections;
using System.Text;
namespace Adatis.Class
{
class DateUpdatedSort : IComparable
{
private string _name;
private DateTime _date;
#region Constructors
public DateUpdatedSort()
{ }
public DateUpdatedSort(string Name, DateTime DateUpdated)
{
this._name = Name;
this._date = DateUpdated;
}
#endregion
#region Interface Methods
///
/// The Method that must re refenced in order for this object to be sorted.
///
///
///
public int CompareTo(object obj)
{
if(obj is DateUpdatedSort)
{
DateUpdatedSort dus = (DateUpdatedSort)obj;
return dus.UpdatedDate.CompareTo(this.UpdatedDate);
}
else
{
throw new Exception(“Object Not Correct type)”;
}
}
#endregion
#region Public Properties
///
/// The name of Control
///
public string Name
{
get {return _name;}
set {_name = value;}
}
///
/// The Date Updated
///
public DateTime UpdatedDate
{
get { return _date; }
set { _date = value;}
}
#endregion
}
}
Meet the Team – Catherine Sachdev, Marketing Assistant
Next up we’re introducing you to Catherine Sachdev. Catherine joined us just over a year
Jan
Data Lineage with Azure Purview
I wrote an introductory Purview blog post previously, where I explored what the tool is
Jan
The Next Era of Retail: How Technology is driving change in a COVID-19 World
The retail sector is of great importance and accounts for almost 5% of GDP and
Jan
Meet the Team – Alex Kordbacheh, Junior Consultant
It’s time for another Meet the Team blog! This time we’re introducing you to Alex
Dec
Use cases for Recursive CTEs
Introductions Recursive CTEs are a way to reference a query over and over again, until
Dec
Azure Sentinel is named a ‘Leader’ in the Forrester Research Wave Report
Microsoft have recently announced that they have been named a Leader by Forrester Research in
Dec
Getting Started with Azure Purview
Azure Purview (a.k.a Data Catalog gen 2) has been released into preview and is currently
2 Comments
Dec
An Introduction to ApexSQL Complete – Integration with SSMS
We all know that the idea of add-ins is to make our lives easier. In
Dec