|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Late Binding syntax problemthe same as the statement above it which works when Option Strict Off? Dim ctlArray As ArrayList) Dim typ As String typ = ctlArray(int).GetType.ToString Select Case typ Case "System.Windows.Forms.CheckBox" ctlArray(int).Checked = False 'DirectCast(ctlArray(int), Control).Checked = False End Select Next Hi,
You should directcast to checkbox not control. Dim c As Control c = New CheckBox Dim t As Type = c.GetType Select Case t.ToString Case "System.Windows.Forms.CheckBox" DirectCast(c, CheckBox).Checked = False End Select Ken ------------------------------ Show quoteHide quote "Dean Slindee" <slin***@charter.net> wrote in message news:fGbwf.19$gN1.1@fe05.lga... > The DirectCast below is a syntax error. Anyone know how to write it to do > the same as the statement above it which works when Option Strict Off? > > Dim ctlArray As ArrayList) > > Dim typ As String > > typ = ctlArray(int).GetType.ToString > > Select Case typ > > Case "System.Windows.Forms.CheckBox" > > ctlArray(int).Checked = False > > 'DirectCast(ctlArray(int), Control).Checked = False > > End Select > > Next > > "Dean Slindee" <slin***@charter.net> schrieb: 'DirectCast(..., CheckBox).Checked = False'.> The DirectCast below is a syntax error. Anyone know how to write it to do > the same as the statement above it which works when Option Strict Off? >[...] > 'DirectCast(ctlArray(int), Control).Checked = False -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Printing an ASP.NET web page from VB.NET - (HTTPWebResponse + Printing)
2 keys pressed at once Namespace around API calls Date/Time control Virtual Serial Port Bluetooth System.IO.Ports rotate gdi object Access SubQuery Help Needed..................... Too many case conditions? copying a collection ListView vs. ListBox in my Program |
|||||||||||||||||||||||