How can I generate the serial key and how can it be validated by the application?
i am sending a question.
plz help me............!!!
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shivanand ArurPosted May 3, 2013, 6:41 AM
public static string GenerateUniqueId()
{
long i = 1;
foreach (byte b in Guid.NewGuid().ToByteArray())
{
i *= ((int)b + 1);
}
return string.Format("{0:x}", i - DateTime.Now.Ticks);
This method will help u fetch a unique ID each time u run it. U can then use this ID and can store it in the database for a particular row. Apply ur logic for validation.
Please mark the answer as accepted if it helped.
amir ansariPosted May 3, 2013, 6:24 AM
Shivanand ArurPosted May 3, 2013, 6:17 AM