I am using this code to generate a 8 digit unique number.
byte[] buffer = Guid.NewGuid().ToByteArray();
return BitConverter.ToUInt32(buffer, 8).ToString();
<
If you express the no as a combination of day( 2digit), hour(2digit), minute(2digit), second(2digit) and year ( 4 digit) , then it will be 12 digit but always unique no.
DateTime _now = DateTime.Now;
string _dd = _now.ToString("dd"); //
string _mm = _now.ToString("MM");
string _yy = _now.ToString("yyyy");
string _hh = _now.Hour.ToString();
string _min = _now.Minute.ToString();
string _ss = _now.Second.ToString();
string _uniqueId= _dd+ _hh+ _mm+_min+_ss + _yy;