Files
hamann-ausgabe-core/Archive/HaDocument/Comparers/PersonComparer.cs
2022-11-25 19:15:23 +01:00

13 lines
402 B
C#

using System;
using HaDocument.Models;
using System.Collections.Generic;
namespace HaDocument.Comparers {
public class PersonComparer : IComparer<Person> {
public int Compare(Person first, Person second) {
var cmp = String.Compare(first.Surname, second.Surname);
if (cmp == 0) cmp = String.Compare(first.Name, second.Name);
return cmp;
}
}
}