Convert this c# to VB.net - bitwise

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does someone know the equivelant to this in vb.net?

c#
if ( (someChar & 0xFF80 ) == 0){
// Evaluated, do something....
}

How can i accomplish this in vb.net? If you could tell me and also explain
the logic, I would be appreciative...

thanks,
 
Got It!

vb using &H to represent a Hex... so the anser is...

If (someChar & &HFF80) = 0 Then

End If
 
If (someChar And &HFF80) = 0 Then
' Evaluated, do something....
End If

Note that And and Or serve two purposes in VB.NET: bitwise operators and
non-short-circuit logical operators (short-circuit logical operators are
AndAlso and OrElse).

David Anton
www.tangiblesoftwaresolutions.com
Home of:
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant J#: VB.NET to J# Converter
 
Back
Top