System.Data.Common.DBConnectionString.NewRestrictionIntersect C# (CSharp) Method

NewRestrictionIntersect() private static method

private static NewRestrictionIntersect ( string a, string b ) : string[]
a string
b string
return string[]
        private static string[] NewRestrictionIntersect(string[] a, string[] b)
        {
            List<string> newlist = null;
            for (int i = 0; i < a.Length; ++i)
            {
                if (0 <= Array.BinarySearch(b, a[i], StringComparer.Ordinal))
                {
                    if (null == newlist)
                    {
                        newlist = new List<string>();
                    }
                    newlist.Add(a[i]);
                }
            }
            string[] restrictionValues = null;
            if (newlist != null)
            {
                restrictionValues = newlist.ToArray();
            }
            Verify(restrictionValues);
            return restrictionValues;
        }