public static string[] GetContainedRoles(Role role) { List<string> roles = new List<string>(); bool control = false; foreach (Role r in RolesOrdered) { if( control ) { roles.Add(r._name); } else { if ( r.Equals( role ) ) { roles.Add(r._name); control = true; } } } return roles.ToArray(); }
public bool Equals(Role other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other._name, _name); }