ContainsItem

Run Settings
LanguageC#
Language Version
Run Command
using System; using System.Collections; using System.Collections.Generic; using System.Linq; class MainClass { static void Main() { string[] arry = {"a","b","f","k"}; string[] arry1 = {"y","b","h","n"}; if(checkExists(arry,arry1)) { Console.WriteLine("True"); } else { Console.WriteLine("false"); } } public static bool checkExists(string [] arry, string[] arry1) { Hashtable list1 = new Hashtable(); for(int i =0; i< arry.Count() ;i++) { if(!list1.ContainsKey(arry[i])) list1.Add(arry[i],true); } for(int k=0;k<arry1.Count(); k++) { if(!list1.ContainsKey(arry1[k])) return true; } return false; } }
Editor Settings
Theme
Key bindings
Full width
Lines