Microsoft.Web.Administration.ValidatorRegistry.IndexOfFirstCorrectChar C# (CSharp) Метод

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

private static IndexOfFirstCorrectChar ( string s ) : int
s string
Результат int
        private static int IndexOfFirstCorrectChar(string s)
        {
            int index = 0;
            while ((index < s.Length) && (s[index] == '_'))
            {
                index++;
            }

            // it's possible that we won't find one, e.g. something called "_"
            return (index == s.Length) ? 0 : index;
        }
    }