Пример #1
0
 private static Cookie Find(Cookie cookie, out int idx)
 {
     for (int i = 0; i < CookieJar.Cookies.Count; i++)
     {
         Cookie cookie2 = CookieJar.Cookies[i];
         if (cookie2.Equals(cookie))
         {
             idx = i;
             return(cookie2);
         }
     }
     idx = -1;
     return(null);
 }
Пример #2
0
        /// <summary>
        /// Find and return a Cookie and his index in the list.
        /// </summary>
        private static Cookie Find(Cookie cookie, out int idx)
        {
            for (int i = 0; i < Cookies.Count; ++i)
            {
                Cookie c = Cookies[i];

                if (c.Equals(cookie))
                {
                    idx = i;
                    return(c);
                }
            }

            idx = -1;
            return(null);
        }