Skip to content

Commit 6fbe910

Browse files
author
Gonzalo Diaz
committed
[BUGFIX] sonarcloud (Maintainability) Collection initialization can be simplified
roslyn:IDE0028 external_roslyn:IDE0028 ROSLYN
1 parent 2c9e52c commit 6fbe910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/algorithm_exercises_csharp/hackerrank/warmup/TimeConversion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static string timeConversion(string _s)
1515
meridian = meridian.ToLower();
1616

1717
string time_str = _s[0..(_s.Length - 2)];
18-
List<string> time = new(time_str.Split(":"));
18+
List<string> time = [.. time_str.Split(":")];
1919

2020
int hour = Int32.Parse(time[0]);
2121

0 commit comments

Comments
 (0)