Results 1 to 4 of 4

Thread: ip adresses

  1. #1
    dmartin17
    Guest

    ip adresses

    There is some way to create a variable type for ip address or something built in.

    Code:
    TcpClient client = new TcpClient();
    client.Connect(serverAddress, serverPort);
    I want to have serverAddresss be able to handle an ip address in the usual form 24.24.43.123; or however i have to enter it in.

    thanks

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    what? That really doesnt make any sense..serveraddress parameter can be an IPAddress.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3
    dmartin17
    Guest
    Code:
     
    using System.net;
    IPAddress ipAdd = new IPAddress(0);
    ipAdd = IPAddress.Parse("127.0.0.1");
    I figured it out. Thanks for helping.

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    oh I see what you meant..ok. glad you figured it out
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

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