debut fonctionnalité tri date

biblioteque
Liam MONCHANIN 2 years ago
parent e653b6b5d9
commit fec591b35d

@ -8,6 +8,11 @@ namespace Biblioteque_de_Class
{
internal class Category
{
public string nom { get; set; }
public string Cnom { get; set; }
Category(string nom)
{
Cnom = nom;
}
}
}

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
@ -23,5 +24,29 @@ namespace Biblioteque_de_Class
DateCreation = DateOnly.FromDateTime(DateTime.Now);
}
public Note TriDate()
{
Note temp;
Note n1;
Note n2;
int i;
for (i = 0; i < tailleMax; i++)
{
if (n1.DateCreation > n2.DateCreation)
{
temp = TabNote[n1.DateCreation];
TabNote[n1.DateCreation] = TabNote[n2.DateCreation];
TabNote[n2.DateCreation] = temp;
}
else
{
temp = TabNote[n2.DateCreation];
TabNote[n2.DateCreation] = TabNote[n1.DateCreation];
TabNote[n1.DateCreation] = temp;
}
}
}
}
}

@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Biblioteque_de_Class
{
public class Recherche
{
}
}
Loading…
Cancel
Save