Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
i'm doing the project in that i want at the record at time check the record is already exist then these record also added with suffix like 1,2,3,.....
Posted
Comments
Richard MacCutchan 2-Nov-11 5:52am    
What records are you talking about, exist where, add to what? Please try and make your question clear.

1 solution

I am really not clear about your question.But For example :
if you have a listbox before you add something in it get all entries to an array with :
C#
ArrayList myarray=new ArrayList();
for(int i=0;i<listbox1.items.count;i++)>
{
myarray.Add(listbox1.Items[i]);
}


Then write a function to f,nd same entries.It should work with two rotation.I mean you should control all of entries with every one.If there is a same entry you should handle it for example with a return; code part.Else you can add your suffix like :
C#
int sameindex; //It should keep your index which you find the same value in others. 
listbox1.Items[sameindex]+=" +Mysuffix";

I did not try this code block.But it will work ^^
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900