Convert to int back and forth : Boolean « Language Basics « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Database ADO.net
6.Development
7.Event
8.File Directory
9.Generics
10.GUI
11.Language Basics
12.LINQ
13.Network Remote
14.Thread
15.Windows Presentation Foundation
16.Windows System
17.XML
18.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Language Basics » BooleanScreenshots 
Convert to int back and forth
Convert to int back and forth

Imports System
Imports System.Data
Imports System.Collections

public class MainClass
   Shared Sub Main()
        Dim As Boolean
        Dim As Integer
        I = 5
        A = CBool(I)
        Console.WriteLine("Value of Boolean assigned from 5 is : " + A.ToString())

        I = CInt(A)

        Console.WriteLine("And converted back to Integer: " + I.ToString())

   End Sub
End Class

           
       
Related examples in the same category
1.Convert boolean to int valueConvert boolean to int value
2.Convert int value to Boolean valueConvert int value to Boolean value
3.(CBool(5) And CBool(8)) with (5 And 8)(CBool(5) And CBool(8)) with (5 And 8)
w_ww__.__j__a__v_a2_s__.__c___o___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.