I have two hash tables. I want to compare values of both the hash tables based on the key. I want to do this in loop and if match is found is want to perform string building operation. But the problem is I dont know any mechanism to compare them in loop. Please guide me... Following are my hash tables to be compared
HashTable OldTable= new HashTable(); OldTable.Add("Date of Event", OCEFData.EventDate); OldTable.Add("Angina Status", OCEFData.AnginaStatusValue); OldTable.Add("Please indicate the body system involved (tick all that apply)",strBodySystem.ToString()); OldTable.Add("If Unstable Angina, define Braunswald Classification", OCEFData.UnstableAnginaValue); OldTable.Add("If Stable Angina", OCEFData.StableAnginaValue); OldTable.Add("Details of method of Documentation of Angina", OCEFData.AnginaDocDetails); OldTable.Add("INFORM TO SPONSOR", (OCEFData.IsInformed)?"Yes":"No"); OldTable.Add("DATE OF INFORMATION TO SPONSOR ", OCEFData.SponsorDate); OldTable.Add("DATE OF INFORMATION TO INSTITUTIONAL ETHICS COMMITTEE", OCEFData.EthicsCommitteeDate); OldTable.Add("DATE OF INFORMATION TO LICENSING AUTHORITY", OCEFData.LicensingAuthority); HashTable NewTable= new HashTable(); NewTable.Add("Date of Event", OCEFData.EventDate); NewTable.Add("Angina Status", OCEFData.AnginaStatusValue); NewTable.Add("Please indicate the body system involved (tick all that apply)", strBodySystem.ToString()); NewTable.Add("If Unstable Angina, define Braunswald Classification", OCEFData.UnstableAnginaValue); NewTable.Add("If Stable Angina", OCEFData.StableAnginaValue); NewTable.Add("Details of method of Documentation of Angina", OCEFData.AnginaDocDetails); NewTable.Add("INFORM TO SPONSOR", (OCEFData.IsInformed)?"Yes":"No"); NewTable.Add("DATE OF INFORMATION TO SPONSOR ", OCEFData.SponsorDate); NewTable.Add("DATE OF INFORMATION TO INSTITUTIONAL ETHICS COMMITTEE", OCEFData.EthicsCommitteeDate); NewTable.Add("DATE OF INFORMATION TO LICENSING AUTHORITY", OCEFData.LicensingAuthority);