How to convert this VB code to C #?

I am having trouble converting this part of the code (originally in VB) to C #. In particular, how to apply negativity to int.

Private Declare Function GetWindowLong Lib "user32" Alias _ "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Const GWL_STYLE = (-16) Private Const WS_MAXIMIZEBOX = &H10000 dim lStyle as long lStyle = GetWindowLong(Lhwnd, GWL_STYLE) lStyle = lStyle And Not WS_MAXIMIZEBOX 
+4
source share
1 answer

In particular, how to apply negativity to int.

I assume that the line you are stuck on is the last. It seems that the code is clearing up a bit. In C # you can do it like this:

 lStyle &= ~WS_MAXIMIZEBOX 
+8
source

Source: https://habr.com/ru/post/1316451/


All Articles