diff --git a/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib.dll b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib.dll new file mode 100644 index 0000000..10ce845 Binary files /dev/null and b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib.dll differ diff --git a/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib.sln b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib.sln new file mode 100644 index 0000000..c997fd2 --- /dev/null +++ b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.352 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DuplicateCheckerLib", "DuplicateCheckerLib\DuplicateCheckerLib.csproj", "{17DFFFC5-D41F-4C9B-99AD-3A14920152DB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {17DFFFC5-D41F-4C9B-99AD-3A14920152DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17DFFFC5-D41F-4C9B-99AD-3A14920152DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17DFFFC5-D41F-4C9B-99AD-3A14920152DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17DFFFC5-D41F-4C9B-99AD-3A14920152DB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A67D4C42-99C6-4966-8AAB-083C0B66A643} + EndGlobalSection +EndGlobal diff --git a/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateChecker.cs b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateChecker.cs new file mode 100644 index 0000000..ece07f6 --- /dev/null +++ b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateChecker.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace DuplicateCheckerLib { + public class DuplicateChecker { + public IEnumerable FindDuplicates(IEnumerable list) { + var hashSet = new HashSet(); + var ret = new List(); + foreach (var item in list) { + if (!hashSet.Add(item)) { + ret.Add(item); + } + } + + return ret; + } + } +} diff --git a/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib.csproj b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib.csproj new file mode 100644 index 0000000..72764a6 --- /dev/null +++ b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib.csproj @@ -0,0 +1,7 @@ + + + + netstandard2.0 + + + diff --git a/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/IEntity.cs b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/IEntity.cs new file mode 100644 index 0000000..f44e215 --- /dev/null +++ b/Aufgaben/DuplicateCheckerLib/DuplicateCheckerLib/DuplicateCheckerLib/IEntity.cs @@ -0,0 +1,8 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace DuplicateCheckerLib { + public interface IEntity { + } +} diff --git a/Generics/Generics.pdf b/Aufgaben/Generics.pdf similarity index 100% rename from Generics/Generics.pdf rename to Aufgaben/Generics.pdf diff --git a/Generics/IRepositoryBase.cs b/Aufgaben/IRepositoryBase.cs similarity index 100% rename from Generics/IRepositoryBase.cs rename to Aufgaben/IRepositoryBase.cs diff --git a/InversionOfControl/InversionOfControl.pdf b/Aufgaben/InversionOfControl.pdf similarity index 100% rename from InversionOfControl/InversionOfControl.pdf rename to Aufgaben/InversionOfControl.pdf diff --git a/LINQ/LINQ_LinqToSql.pdf b/Aufgaben/LINQ_LinqToSql.pdf similarity index 100% rename from LINQ/LINQ_LinqToSql.pdf rename to Aufgaben/LINQ_LinqToSql.pdf diff --git a/NuGet/NuGet.pdf b/Aufgaben/NuGet.pdf similarity index 100% rename from NuGet/NuGet.pdf rename to Aufgaben/NuGet.pdf diff --git a/ObjectEquality/Object Equality.pdf b/Aufgaben/Object Equality.pdf similarity index 100% rename from ObjectEquality/Object Equality.pdf rename to Aufgaben/Object Equality.pdf diff --git a/Reflection_Serialization/Reflection_Serialization.pdf b/Aufgaben/Reflection_Serialization.pdf similarity index 100% rename from Reflection_Serialization/Reflection_Serialization.pdf rename to Aufgaben/Reflection_Serialization.pdf diff --git a/RegEx/RegEx.pdf b/Aufgaben/RegEx.pdf similarity index 100% rename from RegEx/RegEx.pdf rename to Aufgaben/RegEx.pdf diff --git a/ObjectEquality/DuplicateCheckerLib.zip b/ObjectEquality/DuplicateCheckerLib.zip deleted file mode 100644 index 24e9537..0000000 Binary files a/ObjectEquality/DuplicateCheckerLib.zip and /dev/null differ