Skip to content

Commit ea53ea0

Browse files
committed
C#: Prefer keywords over type names
1 parent 8afac25 commit ea53ea0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

csharp/extractor/Semmle.Util.Tests/TextTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ public void GetPortionTest()
6262
Assert.Equal("poke" + NL + "Until something bad broke," + NL + "And then" + NL, text.GetPortion(2, 19, 4, 8));
6363

6464
// An invalid but recoverable range (to test that a best effort is made rather than crashing).
65-
Assert.Equal(NL + "Who couldn't leave software to fester -" + NL, text.GetPortion(0, Int32.MaxValue, 1, Int32.MaxValue));
65+
Assert.Equal(NL + "Who couldn't leave software to fester -" + NL, text.GetPortion(0, int.MaxValue, 1, int.MaxValue));
6666

6767
// Some quite definitely dodgy ranges (to test that exceptions are thrown).
6868
Assert.Throws<Exception>(() => text.GetPortion(-1, 0, 0, 0));
6969
Assert.Throws<Exception>(() => text.GetPortion(0, -1, 0, 0));
7070
Assert.Throws<Exception>(() => text.GetPortion(0, 0, -1, 0));
7171
Assert.Throws<Exception>(() => text.GetPortion(0, 0, 0, -1));
7272
Assert.Throws<Exception>(() => text.GetPortion(3, 5, 2, 5));
73-
Assert.Throws<Exception>(() => text.GetPortion(2, 5, Int32.MaxValue, 5));
73+
Assert.Throws<Exception>(() => text.GetPortion(2, 5, int.MaxValue, 5));
7474
}
7575

7676
#endregion

csharp/extractor/Semmle.Util/LoggerUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public override void WriteLine(string? value)
3131

3232
public override void WriteLine(string? format, params object?[] args)
3333
{
34-
WriteLine(format is null ? format : String.Format(format, args));
34+
WriteLine(format is null ? format : string.Format(format, args));
3535
}
3636

3737
private readonly object mutex = new object();

0 commit comments

Comments
 (0)