|
-
Dec 10th, 2006, 07:04 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] [2005] vb.net to c#
Hello everyone,
Can someone help me to convert this line of vb.net code to c#? [ ]
VB Code:
Private callme As New callfunc(AddressOf sendsms)
Thanks
Godwin
Help someone else with what someone helped you! 
-
Dec 10th, 2006, 07:36 AM
#2
Re: [2005] vb.net to c#
 Originally Posted by uniquegodwin
Hello everyone,
Can someone help me to convert this line of vb.net code to c#? [  ]
VB Code:
Private callme As New callfunc(AddressOf sendsms)
Thanks
Hi Godwin,
You can try this code;
VB Code:
private callfunc callme = new callfunc(/* might be wrong, please check */ new EventHandler(sendsms));
Wkr,
sparrow1
-
Dec 10th, 2006, 07:53 AM
#3
Thread Starter
Fanatic Member
Re: [2005] vb.net to c#
I already saw that sparrow buddy,but it doesn't work
Godwin
Help someone else with what someone helped you! 
-
Dec 10th, 2006, 10:44 AM
#4
Re: [2005] vb.net to c#
In this case you can simply use (from Instant C#):
private callfunc callme = new callfunc(sendsms);
-
Dec 10th, 2006, 12:00 PM
#5
Thread Starter
Fanatic Member
Re: [2005] vb.net to c#
Well,c# 2.0 doesnt allow that
Godwin
Help someone else with what someone helped you! 
-
Dec 10th, 2006, 12:01 PM
#6
Thread Starter
Fanatic Member
Re: [2005] vb.net to c#
Nevermind,I solved the problem using background worker...instead of using threading with delegates But,now i got a diff problem related to speed.
Godwin
Help someone else with what someone helped you! 
-
Dec 10th, 2006, 01:15 PM
#7
Re: [2005] vb.net to c#
 Originally Posted by uniquegodwin
Well,c# 2.0 doesnt allow that 
Right - I think sparrow1 was on the right track, except that you need to know the exact event handler delegate type. Since this is not defined anywhere for your sample, Instant C# couldn't use that. (I should have noticed it before posting).
-
Dec 10th, 2006, 01:34 PM
#8
Thread Starter
Fanatic Member
Re: [RESOLVED] [2005] vb.net to c#
Nevermind,Yet,Thanks for trying to help guys...I really appreciate
Godwin
Help someone else with what someone helped you! 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|