المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : GUID Unique identifer theory question



C# Programming
11-10-2009, 12:40 PM
I have a question about GUID. I created a calender admin program that stores event data in an xml file. The xml file consist of an element called call ID. I am using ID as a key. Each event has a unique id.

My code generates a GUID for each new event. Currently I set up a method in my code behind to see if the GUID exist before I except the value of the new GUID. My understanding the sytem should generate a unique GUID each time you create one. I am thinking it is possible to get a duplicate GUID value, for example if I move the application to a new server.

Is this good practice or just a waste of resources?

Thanks,
David