CSharp examples for System:Random
Create Random No by date
using System.Text; using System.Diagnostics; using System.Collections.Generic; using System;/* w ww . j a v a 2s . co m*/ public class Main{ public static string CreateNo() { Random random = new Random(); string strRandom = random.Next(1000, 10000).ToString(); string code = DateTime.Now.ToString("yyyyMMddHHmmss") + strRandom; return code; } }