Skip to content

Commit 5769ee5

Browse files
authored
Use Convert.ToHexStringLower() in C#
1 parent d7c1d09 commit 5769ee5

File tree

1 file changed

+1
-11
lines changed
  • bench/algorithm/mandelbrot

1 file changed

+1
-11
lines changed

bench/algorithm/mandelbrot/1.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static void Main(string[] args)
4242

4343
using var hasher = MD5.Create();
4444
var hash = hasher.ComputeHash(data);
45-
Console.WriteLine(ToHexString(hash));
45+
Console.WriteLine(Convert.ToHexStringLower(hash));
4646
}
4747

4848
static byte mbrot8(double[] cr, double civ)
@@ -118,14 +118,4 @@ static void mul(Span<double> a, Span<double> b, Span<double> r)
118118
r[i] = a[i] * b[i];
119119
}
120120
}
121-
122-
static string ToHexString(byte[] ba)
123-
{
124-
StringBuilder hex = new StringBuilder(ba.Length * 2);
125-
foreach (byte b in ba)
126-
{
127-
hex.AppendFormat("{0:x2}", b);
128-
}
129-
return hex.ToString();
130-
}
131121
}

0 commit comments

Comments
 (0)