Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnab-developer/arc.namescompare
Compare two list of names
https://github.com/arnab-developer/arc.namescompare
csharp dotnet nuget
Last synced: 20 days ago
JSON representation
Compare two list of names
- Host: GitHub
- URL: https://github.com/arnab-developer/arc.namescompare
- Owner: Arnab-Developer
- License: mit
- Created: 2021-11-16T08:31:31.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-13T04:04:49.000Z (over 2 years ago)
- Last Synced: 2024-12-17T02:57:21.656Z (about 2 months ago)
- Topics: csharp, dotnet, nuget
- Language: C#
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Names compare
This is a library to compare two lists of names and return common and unique names between them.
Install in your project with [NuGet](https://www.nuget.org/packages/Arc.NamesCompare).
```
dotnet add package Arc.NamesCompare
```Sample code to use the library.
```csharp
IEnumerable nameList1 = new List { "Name1", "Name2", "Name3", "Name4" };
IEnumerable nameList2 = new List { "Name1", "Name3", "Name5" };ComparisonResult result = Compare.GetComparisonResult(nameList1, nameList2);
foreach(string name in result.CommonNames)
{
Console.WriteLine(name); // Name1 and Name3
}foreach(string name in result.UniqueList1Names)
{
Console.WriteLine(name); // Name2 and Name4
}foreach(string name in result.UniqueList2Names)
{
Console.WriteLine(name); // Name5
}
```