Format:
Recent snippets matching tags of Random
DECLARE @RandomNumber float DECLARE @RandomInteger int DECLARE @MaxValue int DECLARE @MinValue int SET @MaxValue = 4 SET @MinValue = 2 SELECT @RandomNumber = RAND()
373 Views
no comments
/*http://www.codesake.com*/ public class MISC { private static Random random = new Random((int)DateTime.Now.Ticks); public static int Next(int minValue, int maxValue) { lock (random) { return random.Next(minValue, maxValue); }
218 Views
no comments
public static string RandomAlphaNumeric(int digits) { Random random = new Random(); byte[] buffer = new byte[digits / 2]; random.NextBytes(buffer); string result = String.Concat( buffer.Select(x => x.ToString("X2")).ToArray()); if (digits % 2 == 0) { return result;
253 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
