Check out example codes for "get sites ip in C#". It will help you in understanding the concepts better.
Code Example 1
var url = "https://www.google.com/";
Uri myUri = new Uri(url);
var ip = Dns.GetHostAddresses(myUri.Host)[0];
Learn ReactJs, React Native from akashmittal.com