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.