JackOfPH
asked on
Object reference not set to an instance of an object.
Public Class Form1
Dim WithEvents Monitor As Timer
Dim Drives As Dictionary(Of Integer, System.IO.DriveInfo)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For Letters As Int16 = 65 To 90
Dim mDrives As System.IO.DriveInfo = New System.IO.DriveInfo(Chr(Le tters))
Drives.Add(Letters, mDrives) '--> Getting the error here.
Next
Monitor.Start()
End Sub
end class
Dim WithEvents Monitor As Timer
Dim Drives As Dictionary(Of Integer, System.IO.DriveInfo)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For Letters As Int16 = 65 To 90
Dim mDrives As System.IO.DriveInfo = New System.IO.DriveInfo(Chr(Le
Drives.Add(Letters, mDrives) '--> Getting the error here.
Next
Monitor.Start()
End Sub
end class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
HAHAHA!!!
Silly me!!!
Beginners mistake!!!
Jack