DirectCast from Integer to MsgBoxResult : DirectCast « Development « VB.Net Tutorial






Option Strict On

Public Module TestDirectCast
   Public Sub Main
   Dim choice As Integer = MsgBox("Continue?", MsgBoxStyle.YesNo)
   Dim result As MsgBoxResult = DirectCast(choice, MsgBoxResult)
   Console.WriteLine(result.ToString)
   End Sub
End Module
No








7.21.DirectCast
7.21.1.DirectCast
7.21.2.DirectCast from Integer to MsgBoxResult