I created a software in Windows Form Application that includes two Forms.
In the form1 there are some textboxes and a listbox.
One of textboxes i populated in a listbox with followin method.
the name of textbox is xhirollogariaBox
Random rasti = new Random();
int numri = rasti.Next(10000000, 99999999);
xhiro = "1301" + numri;
xhirollogariaBox.Text = Convert.ToString(xhiro);
The problem is that i don't know how to make a method or a solution to prevent the future number not to be thw same as they are in thelistbox.
So how to make a solution to prevent next entries (numbers) to be writen if the same number already exists in the listbox.
Also one other problem is that I don't know how to prevent another textbox to include numbers, probably that is something like regular expressions or whatever.
Thank you in advance for your reply.