Inverts all the bit values in the current BitArray
Imports System
Imports System.Collections
Imports Microsoft.VisualBasic
Public Class SamplesBitArray
Public Shared Sub Main()
Dim myBA1 As New BitArray(4)
Dim myBA2 As New BitArray(4)
myBA1(0) = False
myBA1(1) = False
myBA1(2) = True
myBA1(3) = True
myBA2(0) = False
myBA2(2) = False
myBA2(1) = True
myBA2(3) = True
PrintValues(myBA1)
PrintValues(myBA2)
myBA1.Not()
myBA2.Not()
PrintValues(myBA1)
PrintValues(myBA2)
End Sub
Public Shared Sub PrintValues(myList As IEnumerable)
Dim obj As [Object]
For Each obj In myList
Console.WriteLine(obj)
Next obj
End Sub
End Class