A message to let know the recorded information
Post your questions regarding programming in C# in here.
4 posts
Page 1 of 1
First of all i want say thanks to all of you for your admirable help since a entered in this forum.
My question is: Thire is any way how to konw if a record is repited by showing a message?
i´m using C#
My question is: Thire is any way how to konw if a record is repited by showing a message?
i´m using C#
You could check for repeats/duplicates in a listbox with this:
Code: Select all
private void btnCheck_Click(object sender, EventArgs e)
{
for (int i = 0; i < listBox1.Items.Count; i++)
{
for (int i2 = 0; i2 < listBox1.Items.Count; i2++)
{
if (i != i2 && listBox1.Items[i] == listBox1.Items[i2])
{
MessageBox.Show("Duplicate items at index " + i + " and " + i2);
}
}
}
}
Now how can i conect the listbox to my database? I mean the information that i´ll be adding in the database how can it go to the listbox.
It depends on which type of database you are using and how you are currently storing the data.
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023