What is the best datatype for an ID?

I want to have an ID to store dynamically created items in a dictionary. Technically I think a ulong would be way more than enough for what I need, but I was wondering if there was technically another datatype that could have more possibilities for combinations? maybe some sort of hexadecimal value?

If you want to store items as the key to a dictionary just use object as the key and don’t bother trying to make your own id. If you do want to allocate IDs - use a Guid or a Guid as a string:

   var uniqueId = Guid.NewGuid();
   var uniqueStringId = Guid.NewGuid().ToString();