hi to all,
how to generate the license key based on the MAC address of the Computer.
i have used the following code:
public string RandomString()
{
string input = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
StringBuilder builder = new StringBuilder();
char ch;
for (int i = 0; i < 5; i++)
{
ch = input[rd.Next(0, input.Length)];
builder.Append(ch);
}
return builder.ToString();
}
private void btn_License_Click(object sender, EventArgs e)
{
string s1 = RandomString();
string s2 = RandomString();
string s3 = RandomString();
string s4 = RandomString();
string s5 = RandomString();
textBox1.Text = s1 + " - " + s2 + " - " + s3 + " - " + s4 + " - " + s5;
}