private string GenerateID() { } private void auto() { AdmissionNo.Text = "A-" + GenerateID(); }
private int nextId = 1; private void auto() { lock(nextId) { AdmissionNo.Text = string.Format("A-{0:0000}", nextId++); } }
lock
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)