这个定义能否简化

ljhwz 2003-08-18 07:13:43
[DllImport("wtpos.dll")]
public static extern int aaa(int Port);
[DllImport("wtpos.dll")]
public static extern int bbb();
[DllImport("wtpos.dll")]
public static extern int ccc(byte nAdr,byte nResult);
[DllImport("wtpos.dll")]
public static extern int ddd(string nCardID);

请问这个定义能否简化.如:变成如下样式
[DllImport("wtpos.dll")]
{
public static extern int aaa(int Port);
public static extern int bbb();
public static extern int ccc(byte nAdr,byte nResult);
public static extern int ddd(string nCardID);
}
...全文
17 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ljhwz 2003-08-18
  • 打赏
  • 举报
回复
这样是不能通过的,我是想问,有没有类似的方法.
雪狼1234567 2003-08-18
  • 打赏
  • 举报
回复
可以
不过最好一个一个的声明
tyc2002 2003-08-18
  • 打赏
  • 举报
回复
我想可以的,你看这样定义的能编译得过,不就知道了吗?

110,499

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧