This repository has been archived on 2023-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
BirdsiteLIVE/src/DataAccessLayers/BirdsiteLive.DAL/Tools/RandomGenerator.cs
2020-07-05 20:22:34 -04:00

18 lines
463 B
C#

using System;
using System.Linq;
namespace BirdsiteLive.DAL.Tools
{
public static class RandomGenerator
{
private static readonly Random Random = new Random();
public static string GetString(int length)
{
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
return new string(Enumerable.Repeat(chars, length)
.Select(s => s[Random.Next(s.Length)]).ToArray());
}
}
}