Commit bf88d647 authored by Uwe Wienkop's avatar Uwe Wienkop
Browse files

2020-06-09a

parent f3ccc48d
......@@ -48,14 +48,15 @@ namespace _07KeyValueList
}
class ComplexKey : IComparable<ComplexKey>
{
public int wert1;
public string wert2;
public int Wert1 { get; set; }
public string Wert2 { get; set; }
public ComplexKey(int Wert1, string Wert2) { this.Wert1 = Wert1;this.Wert2 = Wert2; }
public int CompareTo(ComplexKey other)
{
int diff = wert1.CompareTo(other.wert1);
int diff = Wert1.CompareTo(other.Wert1);
if (diff != 0)
return diff;
return wert2.CompareTo(other.wert2);
return Wert2.CompareTo(other.Wert2);
}
}
class Program
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>_08_UebgDiDatentypSet</RootNamespace>
</PropertyGroup>
</Project>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment