Microsoft.Zing.Templates.GetMemberIndexByName C# (CSharp) Méthode

GetMemberIndexByName() public static méthode

public static GetMemberIndexByName ( MemberList members, string name ) : int
members MemberList
name string
Résultat int
        public static int GetMemberIndexByName(MemberList members, string name)
        {
            for (int i = 0, n = members.Count; i < n; i++)
            {
                if (members[i] != null && members[i].Name.Name == name)
                    return i;
            }

            throw new ApplicationException(string.Format("Member '{0}' not found", name));
        }