Results 1 to 8 of 8

Thread: [RESOLVED] [2005] vb.net to c#

  1. #1

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    Resolved [RESOLVED] [2005] vb.net to c#

    Hello everyone,
    Can someone help me to convert this line of vb.net code to c#? []
    VB Code:
    1. Private callme As New callfunc(AddressOf sendsms)
    Thanks
    Godwin

    Help someone else with what someone helped you!

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [2005] vb.net to c#

    Quote Originally Posted by uniquegodwin
    Hello everyone,
    Can someone help me to convert this line of vb.net code to c#? []
    VB Code:
    1. Private callme As New callfunc(AddressOf sendsms)
    Thanks
    Hi Godwin,

    You can try this code;

    VB Code:
    1. private callfunc callme = new callfunc(/* might be wrong, please check */ new EventHandler(sendsms));

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    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!

  4. #4
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    Re: [2005] vb.net to c#

    In this case you can simply use (from Instant C#):

    private callfunc callme = new callfunc(sendsms);
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

  5. #5

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    Re: [2005] vb.net to c#

    Well,c# 2.0 doesnt allow that
    Godwin

    Help someone else with what someone helped you!

  6. #6

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    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!

  7. #7
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    Re: [2005] vb.net to c#

    Quote 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).
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

  8. #8

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    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
  •  



Click Here to Expand Forum to Full Width