We Recommend

Beginning VB.NET Beginning VB.NET
Visual Basic .NET is the latest version of the most widely used programming language in the world, popular with professional developers and complete beginners alike. This book will teach you Visual Basic .NET from first principles. You'll quickly and easily learn how to write Visual Basic .NET code and create attractive windows and forms for the users of your applications.


Posted By

mafro on 06/10/08


Tagged

bitwise


Versions (?)


Bitwise RowFilter string


Published in: VB.NET 


Bitwise operators don't work in RowFilter strings, so I found this snippet which does.

  1. 'set bit to filter on
  2. Dim bit As String = Convert.ToString(cmbFilter.SelectedValue)
  3.  
  4. 'bitwise row filter
  5. bs.Filter = "Convert((_state - _state % " & bit & ")/" & bit & ", 'System.Int32') % 2 = 1"

Report this snippet 

You need to login to post a comment.