C#: Change string.Format calls to interpolated strings

This commit is contained in:
Tamas Vajk
2024-06-27 09:20:44 +02:00
parent 4a98436884
commit 0c34b4535a
17 changed files with 58 additions and 58 deletions

View File

@@ -39,7 +39,7 @@ namespace Semmle.Autobuild.CSharp
if (notDotNetProject is not null)
{
builder.Logger.Log(Severity.Info, "Not using .NET Core because of incompatible project {0}", notDotNetProject);
builder.Logger.LogInfo($"Not using .NET Core because of incompatible project {notDotNetProject}");
return BuildScript.Failure;
}

View File

@@ -22,12 +22,12 @@ namespace Semmle.Autobuild.CSharp
}
catch (InvalidEnvironmentException ex)
{
Console.WriteLine("The environment is invalid: {0}", ex.Message);
Console.WriteLine($"The environment is invalid: {ex.Message}");
}
}
catch (ArgumentOutOfRangeException ex)
{
Console.WriteLine("The value \"{0}\" for parameter \"{1}\" is invalid", ex.ActualValue, ex.ParamName);
Console.WriteLine($"The value \"{ex.ActualValue}\" for parameter \"{ex.ParamName}\" is invalid");
}
return 1;
}