Counting records in C#
Post your questions regarding programming in C# in here.
4 posts
Page 1 of 1
I would like to creat a label where would be shown the number of each record i save. Is there any cod for doing so?
You could increment a counter each time a record is saved. The code would depend on what you are saving.
I found this method to count the records, but when it dons´t keep the previous records.
this is a code:
comboBox1.Items.Add(codeTextBox.Text)
label5.Text = comboBox1.Items.Count.ToString();
this is a code:
comboBox1.Items.Add(codeTextBox.Text)
label5.Text = comboBox1.Items.Count.ToString();
If you are storing your records in a combobox then you can just check how many items are in the list.
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023