Unknown Unknown - 4 years ago 72
Vb.net Question

using XOR method 1 xor 1 will be equal to 1

can somebody share me the code for 1 xor 1 will be equal to one thank you so much for the response.
Dim a As Integer = TextBox1.Text
Dim b As Integer = TextBox2.Text

Dim firstPattern As Integer
firstPattern = (a Xor b)


Console.WriteLine(firstPattern)


out put is :
textbox1 = 1
textbox2 = 10101101
result is : 10101100
what i want is : 10101101

Answer Source

Based on what you said, you want Or, not Xor.

Dim firstPattern As Integer
firstPattern = (a Or b)
Console.WriteLine(firstPattern)

Bitwise/Logical operators in VB.net

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download