Monday, 15 February 2010

Vb.Net Writing a sub in the parameter when calling a method -



Vb.Net Writing a sub in the parameter when calling a method -

i have written code perform action in method's parameter:

_myservice.mymethod(userid, profileid, sub(message eventargs) _eventaggregator.sendmessage(message))

this method thats beingness called:

public sub mymethod(userid guid, profileid guid, byval action action(of eventargs)) dim proxy = buildproxy() addhandler proxy.mymethodcompleted, sub(o, e) action(e) using new operationcontextscope(proxy.innerchannel) dim request = new mymethodrequest() {.gebruikerid = userid, .omgevingsid = omgevingid} proxy.mymethodasync(request) end using end sub

now want extend sub passed service method include:

_myservice.mymethod(userid, profileid, sub(message eventargs) _eventaggregator.sendmessage(message) _localvariable = e.result end sub)

this doens't work. possible?

found allready. switching c# vb.net isn't easy ;)

_myservice.mymethod(userid, profileid, sub(message eventargs) _eventaggregator.sendmessage(message) _localvariable = e.result end sub)

just had nail next line after sub ....

vb.net

No comments:

Post a Comment