title: How to maintain precision using DateTime.Now.Ticks in C#
body: <p>I know that when I use DateTime.Now.Ticks in C# it returns a long value but I need to store it in an int variable and I am confused as to whether or not I can maintain that precision.  As of right now I just have a cast</p>
  
  <pre><code>int timeStampValue = (int)DateTime.Now.Ticks;
  </code></pre>
  
  <p>This is a project constraint so I understand there is tons of precision lost.  I guess I just couldn't think of another way to do a timestamp thing stored in an int that I could then compare to other timestamps.</p>
  
  <p>Any suggestions or advice on how to maintain the precision, if possible, would be much appreciated.</p>
  
  <p>Everyone's answers were illustrative.  I actually ended up just setting up a process involving counters where when an item is used it's counter is set to '0' and all other counters are incremented by 1.  Then whatever is the highest counter is the next item to use.</p>