1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-10 03:45:41 +00:00

(#14) Use explicit type

Use implicit using
This commit is contained in:
Oliver Booth 2022-02-14 16:32:30 +00:00
parent 1c0768c472
commit c014b7d410
6 changed files with 8 additions and 16 deletions

View File

@ -1,3 +1 @@
using System;
[assembly: CLSCompliant(true)]
[assembly: CLSCompliant(true)]

View File

@ -1,5 +1,3 @@
using System;
namespace X10D
{
/// <summary>

View File

@ -1,6 +1,4 @@
using System;
namespace X10D
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="DateTime" />.

View File

@ -1,6 +1,4 @@
using System;
namespace X10D
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="DateTimeOffset" />.

View File

@ -67,7 +67,7 @@ namespace X10D
throw new ArgumentNullException(nameof(random));
}
var seed = random.Next();
int seed = random.Next();
var seededRandom = new Random(seed);
var r = (byte)(seededRandom.Next() % (byte.MaxValue + 1));
@ -196,9 +196,9 @@ namespace X10D
throw new ArgumentNullException(nameof(random));
}
var sample = random.Next();
int sample = random.Next();
var sampledRandom = new Random(sample);
return (long)sample << 32 | sampledRandom.Next();
return ((long)sample << 32) | (uint)sampledRandom.Next();
}
/// <summary>

View File

@ -317,12 +317,12 @@ namespace X10D
return string.Empty;
}
var array = source.ToCharArray();
char[] array = source.ToCharArray();
var builder = new StringBuilder(length);
while (builder.Length < length)
{
var next = random.NextFrom(array);
char next = random.NextFrom(array);
builder.Append(next);
}