In a .NET application, how can I identify which network interface is used to communicate to a given IP address?
I am running on workstations with multiple network in
Just to give a complete picture: another approach would be to use Socket.IOControl( SIO_ROUTING_INTERFACE_QUERY, ... )
ConferenceXP includes rather comprehensive function wrapping this, works with IPv4/6 and multicast addresses: https://github.com/conferencexp/conferencexp/blob/master/MSR.LST.Net.Rtp/NetworkingBasics/utility.cs#L84