Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. NetWorking problem!

NetWorking problem!

Scheduled Pinned Locked Moved C#
questioncsharpjavahelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Micu Radu
    wrote on last edited by
    #1

    -------------------------------------------------------------------------- I have a NET problem In java I ahave made a NetCalculator bla bla and I needed a method like this one: public byte [] getBytes () { return InetAddress.getByName(this.ip).getAddress(); } Now I want to port this in C# all fine but I need to return the "byte[]" the ".getAddress();" does this but in C# tthe public byte [] getBytes () { return Dns.GetHostByName(this.ip).AddressList; } Returns something else... How can I convert this to c#? THX... -------------------------------------------------------------------------- How About this?How can I convert this java code to c# public static String nsLookup(String nsl) { String nslookup; InetAddress address = null; try { /* // Get hostname address = InetAddress.getByName(nsl); nslookup = address.getHostName(); */ nslookup = Address.getHostName(InetAddress.getByName(nsl)); } catch (Exception uhe) { nslookup = "unknown"; } return nslookup; } -------------------------------------------------------------------------- (o)(o)

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups