diff --git a/exercises/practice/diamond/DiamondTests.cs b/exercises/practice/diamond/DiamondTests.cs index fa8342551..6de1de0cd 100644 --- a/exercises/practice/diamond/DiamondTests.cs +++ b/exercises/practice/diamond/DiamondTests.cs @@ -7,7 +7,7 @@ public class DiamondTests { public static readonly char[] AllLetters = GetLetterRange('A', 'Z'); - private static string[] Rows(string x) => x.Split(new[] { '\n' }, StringSplitOptions.None); + private static string[] Rows(string x) => x.Split(Environment.NewLine); private static string LeadingSpaces(string x) => x.Substring(0, x.IndexOfAny(AllLetters)); private static string TrailingSpaces(string x) => x.Substring(x.LastIndexOfAny(AllLetters) + 1); @@ -125,4 +125,4 @@ public static Arbitrary Chars() { return Arb.Default.Char().Filter(x => x >= 'A' && x <= 'Z'); } -} \ No newline at end of file +}