vars and target-typed new

This commit is contained in:
Kwoth
2021-12-20 00:15:39 +01:00
parent ee33313519
commit cd379fd308
75 changed files with 198 additions and 198 deletions

View File

@@ -11,8 +11,8 @@ public static class StringExtensions
{
public static string PadBoth(this string str, int length)
{
int spaces = length - str.Length;
int padLeft = spaces / 2 + str.Length;
var spaces = length - str.Length;
var padLeft = spaces / 2 + str.Length;
return str.PadLeft(padLeft).PadRight(length);
}