Skip to content

Commit 2496b73

Browse files
author
Gonzalo Diaz
committed
[BUGFIX] sonarcloud: Remove this method and declare a constant for this value.
Methods should not return constants csharpsquid:S3400
1 parent c5336d2 commit 2496b73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

algorithm-exercises-csharp/Hello.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ namespace algorithm_exercises_csharp;
44

55
public class HelloWorld
66
{
7+
const string message = "Hello World!";
8+
79
[ExcludeFromCodeCoverage]
810
protected HelloWorld() {}
911

1012
public static string Hello()
1113
{
12-
return "Hello World!";
14+
return HelloWorld.message;
1315
}
1416

1517
public static HelloWorld Create() {

0 commit comments

Comments
 (0)