How to count the total bits of Integer in VB.NET

1 Answer

0 votes
Imports System
Imports System.Runtime.InteropServices.Marshal
				
Public Module Module1
	Public Sub Main()
		Dim total_bits As Byte = SizeOf(GetType(Integer)) * 8
        
        Console.WriteLine(total_bits)
	End Sub
End Module



' run:
'
' 32
'

 



answered Dec 13, 2023 by avibootz

Related questions

1 answer 117 views
1 answer 116 views
1 answer 136 views
1 answer 216 views
2 answers 199 views
...