Converting bitwise AND/NOT from VB.NET to C# -


original code (vb.net):

curstyle = curstyle , (not es_number) 

changed code (c#):

curstyle = curstyle & (!es_number); 

but giving me error:

operator '!' cannot applied operand of type 'long'

es_number of data type long. tried changing int, string, etc. doesn't work.

how solve problem?

and same &; got correctly. not in front of long bitwise not operator. c# equivalent ~.

the c# code be:

curstyle = curstyle & (­~es_number); 

check out bitwise operators in c# or(|), xor(^), and(&), not(~) , explaining c# bitwise operators.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -