易截截图软件、单文件、免安装、纯绿色、仅160KB

请高手帮我把这段vb代码转换成c#代码?

Private Function LShift(lValue, iShiftBits)
If iShiftBits = 0 Then
LShift = lValue
Exit Function
ElseIf iShiftBits = 31 Then
If lValue And 1 Then
LShift = &H80000000
Else
LShift = 0
End If
Exit Function
ElseIf iShiftBits < 0 Or iShiftBits > 31 Then
Err.Raise 6
End If

If (lValue And m_l2Power(31 - iShiftBits)) Then
LShift = ((lValue And m_lOnBits(31 - (iShiftBits + 1))) * m_l2Power(iShiftBits)) Or &H80000000
Else
LShift = ((lValue And m_lOnBits(31 - iShiftBits)) * m_l2Power(iShiftBits))
End If
End Function
-- line 1 col 9: invalid NonModuleDeclaration


第一句似乎有错误 Private Function LShift(lValue, iShiftBits)

没有人会吗?



函数VB code:
Private Function LShift(lValue, iShiftBits)
为什么没有返回值呢


相关问答:

C#调用 C DLL问题,懂的来抢分了

//C 接口
extern "C"
{
  TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);  
}
//我在C#中声明
//调用C DLL 中的函数
[DllImport("OCRapi.dll&quo ......

vb如何调用Illustrator(此前Illustrator未启动)?

请教一下:我用vb写了一个调用Illustrator的测试程序,代码很简单:Private Sub Command1_Click()
Dim app As New Illustrator.Application
Dim doc As Illustrator.Document
Dim thislayer As Illustrator.Layer ......

VB修改注册表

用VB怎么只针对windows自带的文件的右键添加菜单 如(.txt .doc)
这个是只针对以这两个为扩展名的文件操作
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\txtfile\shell\[随便起名]\command]
@= ......

vb修改DTPicker1日期问题

Private Sub Check1_Click()
If Check1.Value = 1 Then
DTP1.Enabled = True
Else
DTP1.Enabled = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
DTP2.Enabled = True
Else ......

vb.net 创建access数据表实现一数据库多个数据表?

请各位指点下:程序代码如下mingchen = "C:\文件路径\"
cat = New ADOX.Catalog
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & min ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号