InstaTax.Core.DomainObjects.PasswordHistory.GetLastThreePriorPasswords C# (CSharp) Méthode

GetLastThreePriorPasswords() private méthode

private GetLastThreePriorPasswords ( ) : IList
Résultat IList
        private IList<Password> GetLastThreePriorPasswords()
        {
            var lastThreePriorPasswords = new List<Password>();
            int count = 0;

            foreach (Password priorPassword in PriorPasswords)
            {
                count++;
                if (count > 3) break;
                lastThreePriorPasswords.Add(priorPassword);
            }
            return lastThreePriorPasswords;
        }