Results 1 to 5 of 5

Thread: How to converted this code?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2007
    Posts
    28

    How to converted this code?

    Private System.Collections.ArrayList m_workSocketList=ArrayList.Synchronized(New System.Collections.ArrayList())
    Socket workerSocker=m_mainSocket.EndAccept

    Above is c# code,who can converted to vb.net code.thanks

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: How to converted this code?

    VB Code:
    1. Private m_workSocketList As ArrayList = ArrayList.Synchronized(New System.Collections.ArrayList)
    2.     Dim workerSocker As System.Net.Sockets.Socket = m_mainSocket.EndAccept
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2007
    Posts
    28

    Re: How to converted this code?

    Socket workerSocker=m_mainSocket.EndAccept(asyn)
    Interlocked.Increment(ref m_ClientCount)
    m_workerSocketList.Add(workerSocket)
    SendMsgToClient(msg,m_Client)


    How to converted above this?

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

    Re: How to converted this code?

    Quote Originally Posted by brale
    Socket workerSocker=m_mainSocket.EndAccept(asyn)
    Interlocked.Increment(ref m_ClientCount)
    m_workerSocketList.Add(workerSocket)
    SendMsgToClient(msg,m_Client)


    How to converted above this?
    Hi,

    You can try this;

    Code:
    Dim workerSocker As Socket = m_mainSocket.EndAccept(asyn)
    Interlocked.Increment(m_ClientCount)
    m_workerSocketList.Add(workerSocket)
    SendMsgToClient(msg, m_Client)
    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

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

    Re: How to converted this code?

    'brale', the code you are posting (and have posted previously) is not C# code. C# is case sensitive and certainly doesn't understand "Private" or "New". C# code also has a semi-colon at the end of statements. (What planet are you from?)
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

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