System.Uri.Uri.IsDomainAddress C# (CSharp) Метод

IsDomainAddress() статический приватный Метод

static private IsDomainAddress ( string name ) : bool
name string
Результат bool
		internal static bool IsDomainAddress (string name)
		{
			int len = name.Length;
			
			int count = 0;
			for (int i = 0; i < len; i++) {
				char c = name [i];
				if (count == 0) {
					if (!Char.IsLetterOrDigit (c))
						return false;
				} else if (c == '.') {
					count = 0;
				} else if (!Char.IsLetterOrDigit (c) && c != '-' && c != '_') {
					return false;
				}
				if (++count == 64)
					return false;
			}
			
			return true;
		}
#if !NET_2_1