you can use the TryParse() method of int, uint, long, ulong depending on the range you want to support; and some overloads will let you choose options, e.g. allowing thousand separators.
Warning: TryParse() will always fail on an empty TextBox.
similar for reals (float, double), dates, etc.
everything in a TextBox is a string.
Luc Pattyn Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you. Local announcement (Antwerp region): Lange Wapper? Neen!
I am tryng to serialize the IP's Server Addresses in my Lan using objects IPHostEntry for getting better the communications with them, later I need that the machines which are going to connect with such Server Serialize and Deserialize the Server's List, but when I try to serialize, both in binary or XML, I receive an error telling me that such object IPHostEntry is not marked as Serializable.
Any suggestion for avoiding this problem
Note: I Create a Dictionary<string, iphostentry=""> containing the name and IP data of every Server and such is the object which I want to Serialize, if the key and value are both strings there is no problem, but when I change to Type IPHOstEntry it does not work.