DirectCast : DirectCast « Development « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.Stream File
13.GUI
14.GUI Applications
15.2D Graphics
16.I18N Internationlization
17.Reflection
18.Regular Expressions
19.Security
20.Socket Network
21.Thread
22.Windows
23.XML
24.Database ADO.net
25.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » Development » DirectCast 
7.21.1.DirectCast
public class Test
   public Shared Sub Main
        Dim numberOfTimes As Object
        numberOfTimes = 12
        If TypeOf numberOfTimes Is Integer Then
            Dim repeatCount As Integer
            repeatCount = _
                DirectCast(numberOfTimes, Integer)
            For idx As Integer = To repeatCount
                Console.WriteLine("Duncanma")
            Next
        End If

    End Sub

End class
Duncanma
Duncanma
Duncanma
Duncanma
Duncanma
Duncanma
Duncanma
Duncanma
Duncanma
Duncanma
Duncanma
Duncanma
7.21.DirectCast
7.21.1.DirectCast
7.21.2.DirectCast from Integer to MsgBoxResult
w_w__w_.___j__a___v__a2__s___.__c___om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.