| Author: Praveen 05 Sep 2008 | Member Level: Gold | Rating: Points: 3 |
ArrayList arr= new ArrayList(); int loop; /// intialization of array
for(loop=0;loop<arr.Count;arr++) { if(arr.Contains(arr[loop])) { arr.RemoveAt(loop); } }
hope this will help u
|
| Author: Vidhya 05 Sep 2008 | Member Level: Gold | Rating: Points: 2 |
hi,
The below code is in vb script. Refer this code:
Dim noDupsArrList As New ArrayList() For i As Integer = 0 To items.Length - 1 If Not noDupsArrList.Contains(items(i).Trim()) Then noDupsArrList.Add(items(i).Trim()) End If Next Dim uniqueItems As String() = New String(noDupsArrList.Count - 1) {} noDupsArrList.CopyTo(uniqueItems) Return uniqueItems
Regards, Vidhya
|
| Author: sirisha choudhary 05 Sep 2008 | Member Level: Silver | Rating: Points: 2 |
take Hash Table instead of Array it will helps u ,
Hash table doesnt allow duplicate values
|