Click here to Skip to main content
15,927,592 members
Home / Discussions / C#
   

C#

 
AnswerRe: MD5 Algorithm Pin
Eddy Vluggen19-Apr-09 22:32
professionalEddy Vluggen19-Apr-09 22:32 
AnswerRe: MD5 Algorithm Pin
Abhijit Jana19-Apr-09 22:35
professionalAbhijit Jana19-Apr-09 22:35 
AnswerRe: MD5 Algorithm Pin
Marc A. Brown20-Apr-09 4:56
Marc A. Brown20-Apr-09 4:56 
QuestionDuplicates in a Arraylist Pin
Vimalsoft(Pty) Ltd19-Apr-09 22:20
professionalVimalsoft(Pty) Ltd19-Apr-09 22:20 
AnswerRe: Duplicates in a Arraylist Pin
Abhijit Jana19-Apr-09 22:32
professionalAbhijit Jana19-Apr-09 22:32 
GeneralRe: Duplicates in a Arraylist Pin
Vimalsoft(Pty) Ltd20-Apr-09 3:15
professionalVimalsoft(Pty) Ltd20-Apr-09 3:15 
GeneralRe: Duplicates in a Arraylist Pin
Vimalsoft(Pty) Ltd23-Apr-09 2:05
professionalVimalsoft(Pty) Ltd23-Apr-09 2:05 
AnswerRe: Duplicates in a Arraylist Pin
OriginalGriff19-Apr-09 22:44
mveOriginalGriff19-Apr-09 22:44 
While I would use a List<t> rather than an ArrayList, the principle is the same.
1) sort your data.
2) foreach(...) loop to spot the duplicates.
allAlbums.Sort();
 #region Logging
 LogEvent(string.Format("       Removing Duplicates"),
          VerboseType.Verbose);
 #endregion
 List<Album> deleteThese = new List<Album>();
 Album last = new Album("? - ? 2099");
 foreach (Album a in allAlbums) {
     if (a.Name == last.Name) {
         #region Logging
         LogEvent(string.Format("   Marking \"{0}\"", a.ToString()),
                  VerboseType.TooMuchInformation);
         #endregion
         deleteThese.Add(a);         // Can't delete yet - would upset foreach
         }
     last = a;
     }
 foreach (Album a in deleteThese) {
     allAlbums.Remove(a);
     }
 #region Logging
 LogEvent(string.Format("       ...{0} duplicates removed", deleteThese.Count),
          VerboseType.Verbose);
 #endregion

GeneralRe: Duplicates in a Arraylist Pin
Vimalsoft(Pty) Ltd20-Apr-09 3:16
professionalVimalsoft(Pty) Ltd20-Apr-09 3:16 
AnswerRe: Duplicates in a Arraylist Pin
N a v a n e e t h20-Apr-09 1:21
N a v a n e e t h20-Apr-09 1:21 
GeneralRe: Duplicates in a Arraylist Pin
Vimalsoft(Pty) Ltd20-Apr-09 3:22
professionalVimalsoft(Pty) Ltd20-Apr-09 3:22 
GeneralRe: Duplicates in a Arraylist Pin
Alan Balkany20-Apr-09 3:55
Alan Balkany20-Apr-09 3:55 
GeneralRe: Duplicates in a Arraylist Pin
Vimalsoft(Pty) Ltd7-May-09 3:18
professionalVimalsoft(Pty) Ltd7-May-09 3:18 
AnswerRe: Duplicates in a Arraylist Pin
#realJSOP20-Apr-09 3:08
professional#realJSOP20-Apr-09 3:08 
GeneralRe: Duplicates in a Arraylist Pin
Vimalsoft(Pty) Ltd20-Apr-09 3:25
professionalVimalsoft(Pty) Ltd20-Apr-09 3:25 
AnswerRe: Duplicates in a Arraylist Pin
PIEBALDconsult20-Apr-09 14:11
mvePIEBALDconsult20-Apr-09 14:11 
GeneralRe: Duplicates in a Arraylist Pin
Vimalsoft(Pty) Ltd7-May-09 3:17
professionalVimalsoft(Pty) Ltd7-May-09 3:17 
QuestionPublish : How i set the installing(Destination) path Pin
ddravin200019-Apr-09 21:48
ddravin200019-Apr-09 21:48 
AnswerRe: Publish : How i set the installing(Destination) path Pin
Abhijit Jana19-Apr-09 22:10
professionalAbhijit Jana19-Apr-09 22:10 
QuestionHow to insert relational Data with TableAdapter. Pin
hdv21219-Apr-09 21:30
hdv21219-Apr-09 21:30 
QuestionBinding data to the combobox Pin
Schdev19-Apr-09 21:14
Schdev19-Apr-09 21:14 
AnswerRe: Binding data to the combobox Pin
karlodegrano19-Apr-09 21:55
karlodegrano19-Apr-09 21:55 
AnswerRe: Binding data to the combobox Pin
Mycroft Holmes20-Apr-09 0:55
professionalMycroft Holmes20-Apr-09 0:55 
QuestionProblem with Directory Resolution Pin
Hiten Parmar19-Apr-09 21:06
Hiten Parmar19-Apr-09 21:06 
AnswerRe: Problem with Directory Resolution Pin
Vikram A Punathambekar19-Apr-09 21:23
Vikram A Punathambekar19-Apr-09 21:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.