NetWorking problem!
-
-------------------------------------------------------------------------- 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)