VB中的AddressOf在C#中如何描述呢 - .NET技术 / C#
下面是VB中的代码
Public Delegate Sub EventHandler(ByVal sender As Object, ByVal e As EventArgs)
Public my_eh As EventHandler
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'wince下实例
my_eh = New EventHandler(AddressOf Up_do_DateReceivced)
End Sub
在C#中我应该如何描述VB中的AddressOf呢
谢谢啦!
ref或者out
好像应该 ref
my_eh = New EventHandler(Up_do_DateReceivced)
甚至你可以直接
my_eh = Up_do_DateReceivced;
省略不写就可以了。
谢谢各位了!
相关问答:
我想把word另存为xml之后,用vb读取这个xml的内容,请问如何实现?
dim f as integer
dim b() as byte
dim s as string
dim L as long
f=freefile()
open "abc.xml" for binary access read as #f
......
在根目录/lib中存放一个log.c,log.h,并用下面的语句:
gcc -c log.c
ar crv liblog.a log.o
编译出一个liblog.a静态库,然后在文件夹:/testfile中创建一个test.c和testc.c,test.c中引用了testc.c中定义的方法 ......
现在有个xml文件是<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
xmlDoc1.loadXML(h)总是返回false,为什么?谢谢帮忙回答一下
h是什么呢。。。。。。。。。
h是xml格式的字符串
你是想打开。XML格式的文件吧?
我是把h放在xmlDoc1里,用xmlDoc1.loadXML(h),然后取xmlDo ......
挺繁琐,之前发的帖子,分值太低现在重发一个。欢迎各位大侠~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......