System.Runtime.Serialization.Formatters.Binary.MessageFormatter.IsInternalKey C# (CSharp) Method

IsInternalKey() static private method

static private IsInternalKey ( string key, string internalKeys ) : bool
key string
internalKeys string
return bool
		static bool IsInternalKey (string key, string[] internalKeys)
		{
			foreach (string ikey in internalKeys)
				if (key == ikey) return true;
			return false;
		}

Usage Example

        private static object[] GetExtraProperties(IDictionary properties, string[] internalKeys)
        {
            object[] array = new object[properties.Count - internalKeys.Length];
            int      num   = 0;
            IDictionaryEnumerator enumerator = properties.GetEnumerator();

            while (enumerator.MoveNext())
            {
                if (!MessageFormatter.IsInternalKey((string)enumerator.Entry.Key, internalKeys))
                {
                    array[num++] = enumerator.Entry;
                }
            }
            return(array);
        }