Hi… facing issue while adding keywords to dictionary because of duplicate city names like India and Pakistan both have city name Hyderabad etc. So can we have solution if we ignore or highlight any duplicate before adding to dictionary.
Note: there will be multiple keywords just providing sample table.
Expand Table
No we cannot concatenate or join city country because after adding to dictionary i want to search each keyword in dictionary ( city names) in string to find matching keywords which will return country name of matched keyword.
I have one linq for adding this data to dictionary. But problem is if we getting duplicates as i mentioned Hyderabad or anything else it will provide error( key already added to dictionary).
Hence i want to first remove or perform some action on that duplicate keywords. Before using that linq to add into dictionary.
Attaching linq query please check…I am getting error if i create variable of dictionary (Tuple,, ) for that linq getting error.
Thank you…just small requirement can we separate cities column into 2 column where first column contains only single word city or keyword name and other column contain two or than two word city or keyword name.
E.g.
If cities/ keyword are:
India
IN,Navi Mumbai,Delhi,Mysore,Jammu and Kashmir,Surat,Hyderabad,West Bengal,Bangalore