VB和C#都通的高手帮忙看下 VB转化C#的代码有问题
VB代码:
Ret = Str(CDbl(ReadfromIni(My.Application.Info.DirectoryPath & "\PointTable2.ini", "Group", "VFD")))
我转成的C#代码:
Ret = Conversion.Str(double.Parse(Module1.ReadfromIni((new
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.DirectoryPath + "\\PointTable2.ini", "Group",
"VFD")));
调试的时候 到这一行 提示“输入字符串的格式不正确。”
是这段代码写的有问题 还是我的程序其它地方出问题了 高手帮忙看下!! 万分感激!!!!
PS:就是从ini文件里读取信息。 Ret是string型的 \PointTable2.ini是ini文件名 该文件的内容是
-----------------------------
[Group]
VFD=group
[Items]
Itm1=0001_CV
Itm2=0002_CV
.
.
.
Itmi=000i_CV
如需要阅读该回复,请登录或注册CSDN!
相关问答:
//C 接口
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//我在C#中声明
//调用C DLL 中的函数
[DllImport("OCRapi.dll&quo ......
请问用C或C++如何编写求解3D魔方的程序,该从何开始?
谢谢各位,帮忙提点建议吧。
http://www.mofang.net/code/176/182/6581.html
我只能突破60秒!唉。
我刚过40秒
google的android中有个OpenGL ES + ......
写了个测试程序如下
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
请教一下:我用vb写了一个调用Illustrator的测试程序,代码很简单:Private Sub Command1_Click()
Dim app As New Illustrator.Application
Dim doc As Illustrator.Document
Dim thislayer As Illustrator.Layer ......
想在warcraft3里进行写屏操作【如对战平台中的胜负提示信息】,效果就像游戏平台中一样,我试过在一窗口中写入文字,然后一直让窗口强制最前,虽然能实现文字显示,但是文字会不断闪烁,而且有不确定BUG,通过论坛搜 ......