You are on page 1of 1

Function Kata ToDictionary

Schreibe eine Funktion, die einen speziell formatierten String in ein Dictionary wandelt. Die Funktion soll folgende Signatur haben:
IDictionary<string, string> ToDictionary(string input);

Die folgende Tabelle zeigt einige Beispiele fr Strings als Eingaben und das resultierende Dictionary.
"a=1;b=2;c=3" "a=1;a=2" "a=1;;b=2" "a=" "=1" "" "a==1" {{"a", "1"}, {"b", "2"},{"c", "3"}} {{"a", "2"}} {{"a", "1"}, {"b", "2"}} {{"a", ""}} Exception {} {{"a", "=1"}}

http://ccd-school.de

You might also like