To be explicitly clear here, Martin Liversage's answer is the most correct answer. The api will first attempt to locate CNAME records for the domain being resolved. If a CNAME record is found the api will then attempt to resolve the A records of the domain returned from the CNAME record. If there are no CNAME records for the domain being resolved then it will attempt to resolve A records for the domain itself.
To detect when a CNAME record exists the resolved hostname can be checked against the input hostname. Example:
IPHostEntry iphostEntry = Dns.GetHostEntry(inputHostname);
if (iphostEntry.Hostname != inputHostname) {
Console.WriteLine("CNAME record exists pointing {0} to {1}", inputHostname, iphostEntry.Hostname);
Console.WriteLine("iphostEntry.AddressList values are the A record values of {0}", iphostEntry.Hostname);
} else {
Console.WriteLine("CNAME record does NOT exist for {0}", inputHostname);
Console.WriteLine("iphostEntry.AddressList values are the A record values of {0}", inputHostname);
}