一个计数器类

    public class Counter
    {
        
private static UInt32 _counter = 0;
        
public static UInt32 Next
        {
            
get
            {
                
if (_counter == 99999999) { _counter = 0; }
                _counter
++;
                
string _prenum = DateTime.Now.ToString("dd");
                
string ret = _prenum + _counter.ToString("00000000");
                
return Convert.ToUInt32(ret);
            }
        }
        
public static void Reset()
        {
            _counter 
= 0;
        }
    }
原文地址:https://www.cnblogs.com/Aricc/p/1529246.html