コード例 #1
0
ファイル: NSDictionary.cs プロジェクト: deriyuval/plist-cil
 /// <summary>
 /// Checks whether a given value is contained in this dictionary.
 /// </summary>
 /// <param name="val">The value that will be searched for.</param>
 /// <returns>Whether the key is contained in this dictionary.</returns>
 public bool ContainsValue(long val)
 {
     foreach (NSObject o in dict.Values)
     {
         if (o.GetType().Equals(typeof(NSNumber)))
         {
             NSNumber num = (NSNumber)o;
             if (num.isInteger() && num.ToInt() == val)
             {
                 return(true);
             }
         }
     }
     return(false);
 }