mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Initial replacement of old repository.
This commit is contained in:
13
HaDocument/Comparers/PersonComparer.cs
Normal file
13
HaDocument/Comparers/PersonComparer.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user