Click here to Skip to main content
16,005,222 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: time problem Pin
Anonymous13-Aug-05 4:31
Anonymous13-Aug-05 4:31 
GeneralVb.net custom dll and installer Pin
FlyngTiger12-Aug-05 8:00
FlyngTiger12-Aug-05 8:00 
GeneralRe: Vb.net custom dll and installer Pin
rwestgraham12-Aug-05 8:59
rwestgraham12-Aug-05 8:59 
GeneralRe: Vb.net custom dll and installer Pin
FlyngTiger12-Aug-05 9:12
FlyngTiger12-Aug-05 9:12 
GeneralRe: Vb.net custom dll and installer Pin
rwestgraham12-Aug-05 11:12
rwestgraham12-Aug-05 11:12 
GeneralRe: Vb.net custom dll and installer Pin
FlyngTiger15-Aug-05 2:45
FlyngTiger15-Aug-05 2:45 
General"One Of" Items in an ArrayList Pin
Vodstok12-Aug-05 6:32
Vodstok12-Aug-05 6:32 
GeneralRe: "One Of" Items in an ArrayList Pin
ToddHileHoffer12-Aug-05 6:52
ToddHileHoffer12-Aug-05 6:52 
Here is function that will do the trick.

 Private Function DistinctArray(ByVal arr As ArrayList) As ArrayList<br />
        Dim x As New ArrayList<br />
        Dim myEnumerator As System.Collections.IEnumerator = _<br />
                   arr.GetEnumerator()<br />
        While myEnumerator.MoveNext()<br />
            If Not x.Contains(myEnumerator.Current) Then<br />
                x.Add(myEnumerator.Current)<br />
            End If<br />
            'Console.Write(ControlChars.Tab + "{0}", myEnumerator.Current)<br />
        End While<br />
        Return x<br />
End Function


Here is my test code.

Dim arr As New ArrayList<br />
      arr.Add("a")<br />
      arr.Add("b")<br />
      arr.Add("c")<br />
      arr.Add("d")<br />
      arr.Add("e")<br />
      arr.Add("a")<br />
      arr.Add("e")<br />
      arr.Add("a")<br />
      Dim strValues As String<br />
      Dim x As New ArrayList<br />
      x = DistinctArray(arr)<br />
      Dim myEnumerator As System.Collections.IEnumerator = x.GetEnumerator()<br />
      While myEnumerator.MoveNext()<br />
          strValues += myEnumerator.Current & ", "<br />
      End While<br />
      MsgBox(strValues)


"People who never make mistakes, never do anything."

My blog
http://toddsnotsoamazinglife.blogspot.com/
GeneralRe: &quot;One Of&quot; Items in an ArrayList Pin
Vodstok12-Aug-05 7:16
Vodstok12-Aug-05 7:16 
GeneralHELP ME! *** how to test if a datacolumn as changes Pin
isgrom12-Aug-05 5:51
isgrom12-Aug-05 5:51 
GeneralDataGrid Record Position Pin
dptalt12-Aug-05 5:45
dptalt12-Aug-05 5:45 
GeneralRe: DataGrid Record Position Pin
thebread14-Aug-05 10:57
thebread14-Aug-05 10:57 
GeneralRe: DataGrid Record Position Pin
dptalt15-Aug-05 8:15
dptalt15-Aug-05 8:15 
GeneralVery Urgent Pin
Anonymous12-Aug-05 4:45
Anonymous12-Aug-05 4:45 
GeneralRe: Very Urgent Pin
Mohamad Al Husseiny14-Aug-05 4:52
Mohamad Al Husseiny14-Aug-05 4:52 
GeneralCharacters in the textbox Pin
directred12-Aug-05 3:44
directred12-Aug-05 3:44 
GeneralRe: Characters in the textbox Pin
RichardBerry12-Aug-05 4:36
RichardBerry12-Aug-05 4:36 
GeneralRe: Characters in the textbox Pin
StewBob12-Aug-05 11:02
StewBob12-Aug-05 11:02 
Generalreports Pin
Anonymous12-Aug-05 2:05
Anonymous12-Aug-05 2:05 
GeneralRe: reports Pin
Rizwan Bashir12-Aug-05 5:38
Rizwan Bashir12-Aug-05 5:38 
GeneralRe: reports Pin
saciid13-Aug-05 0:29
susssaciid13-Aug-05 0:29 
Generaljpg to avi Pin
Mr. Naveed Butt12-Aug-05 1:20
professionalMr. Naveed Butt12-Aug-05 1:20 
GeneralRe: jpg to avi Pin
Mr. Naveed Butt12-Aug-05 1:25
professionalMr. Naveed Butt12-Aug-05 1:25 
GeneralCPU usage percent Pin
marakaakka11-Aug-05 22:57
marakaakka11-Aug-05 22:57 
GeneralRe: CPU usage percent Pin
[Marc]12-Aug-05 8:17
[Marc]12-Aug-05 8:17 

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.