Click here to Skip to main content
15,884,870 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to convert the following code to vb.net Pin
awara15-May-07 11:44
awara15-May-07 11:44 
AnswerRe: how to convert the following code to vb.net Pin
nlarson1116-May-07 11:15
nlarson1116-May-07 11:15 
QuestionWindows Installer Condition sytax Pin
Karma3125115-May-07 8:42
Karma3125115-May-07 8:42 
AnswerRe: Windows Installer Condition sytax Pin
Joseph Guadagno15-May-07 11:51
Joseph Guadagno15-May-07 11:51 
GeneralRe: Windows Installer Condition sytax Pin
Karma3125117-May-07 9:16
Karma3125117-May-07 9:16 
GeneralRe: Windows Installer Condition sytax Pin
Joseph Guadagno17-May-07 12:22
Joseph Guadagno17-May-07 12:22 
QuestionFavorite free toolbox controls? Pin
gdijim15-May-07 8:27
gdijim15-May-07 8:27 
QuestionRemoving an object from a list Pin
steve_rm15-May-07 8:06
steve_rm15-May-07 8:06 
Hello,

VS 2005

I have the following code below and I would like to remove an object from the list.

For Each timerToStop As Windows.Forms.Timer In emailTimerArray<br />
                If (timerToStop.Tag = callID) Then 'Stop this timer<br />
                    timerToStop.Stop()<br />
                    timerToStop.Enabled = False<br />
                    emailTimerArray.Remove(timerToStop) 'Error<br />
                End If<br />
            Next


The error message i am getting is: "Collection was modified; enumeration operation may not execute"
<br />
Dim emailTimerArray As New List(Of Windows.Forms.Timer)



The way I am filling
emailTimer = New System.Windows.Forms.Timer<br />
            emailTimer.Interval = 25000<br />
            emailTimer.Enabled = True<br />
            emailTimer.Tag = e.CallID<br />
            emailTimerArray.Add(emailTimer)


Many thanks for any help,

Steve
AnswerRe: Removing an object from a list Pin
Dave Kreskowiak15-May-07 10:18
mveDave Kreskowiak15-May-07 10:18 
QuestionMarshalling Variable-Size Array Pin
VFaul15-May-07 7:49
VFaul15-May-07 7:49 
AnswerRe: Marshalling Variable-Size Array Pin
Dave Kreskowiak15-May-07 10:12
mveDave Kreskowiak15-May-07 10:12 
QuestionNotifyIcon and ContextMenuStrip Pin
viperbyte65015-May-07 5:54
viperbyte65015-May-07 5:54 
AnswerRe: NotifyIcon and ContextMenuStrip Pin
Dave Kreskowiak15-May-07 9:54
mveDave Kreskowiak15-May-07 9:54 
GeneralRe: NotifyIcon and ContextMenuStrip Pin
viperbyte65015-May-07 10:39
viperbyte65015-May-07 10:39 
GeneralRe: NotifyIcon and ContextMenuStrip Pin
Dave Kreskowiak15-May-07 12:51
mveDave Kreskowiak15-May-07 12:51 
QuestionDetermine Path of Windows Folder Pin
Rupesh Kumar Swami15-May-07 4:14
Rupesh Kumar Swami15-May-07 4:14 
AnswerRe: Determine Path of Windows Folder Pin
Dave Kreskowiak15-May-07 4:37
mveDave Kreskowiak15-May-07 4:37 
QuestionRe: Determine Path of Windows Folder Pin
Rupesh Kumar Swami15-May-07 6:08
Rupesh Kumar Swami15-May-07 6:08 
AnswerRe: Determine Path of Windows Folder Pin
Dave Kreskowiak15-May-07 6:12
mveDave Kreskowiak15-May-07 6:12 
AnswerRe: Determine Path of Windows Folder Pin
The ANZAC15-May-07 13:14
The ANZAC15-May-07 13:14 
QuestionAccess verses SQL Server [modified] Pin
Werries15-May-07 3:56
Werries15-May-07 3:56 
AnswerRe: Access verses SQL Server Pin
Dave Kreskowiak15-May-07 4:25
mveDave Kreskowiak15-May-07 4:25 
AnswerRe: Access verses SQL Server Pin
Polymorpher15-May-07 17:53
Polymorpher15-May-07 17:53 
QuestionSelect all of the text in a textbox Pin
Marcus J. Smith15-May-07 3:36
professionalMarcus J. Smith15-May-07 3:36 
AnswerRe: Select all of the text in a textbox Pin
Dave Kreskowiak15-May-07 4:17
mveDave Kreskowiak15-May-07 4: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.