Recently, I come across a simple problem where we have to extract subdomain from different URL. Then I decided to write simple extensions in “C# Subdomain from URL”, which can be used easily across the system. Sharing the code: public enum GetSubDomainEnum { ExcludeWWW, IncludeWWW }; public static class Extentions { public static string GetSubDomain(this […]