Question

Is there a way to watch for changes in the ip-address much the same as it is possible to watch for changes to files using the FileSystemWatcher? I'm connecting to a machine via tcp/ip but it takes a while until it gives me an ip-address. I would like to dim out the connect button until I have a valid ip-address.

Was it helpful?

Solution

Check NetworkChange class. It raises an event when a network address changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top