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;
}