I want to generate code for creating a hash table object and assigning it with a key and a value programmatic . it should be similar to
Hashtable ht = new Hashtable(); ht.Add( 'key1', 'value1' ); ht.Add( 'key2', 'value2' ); ht.Add( 'key3', 'value3' );
for eg
CodeMemberMethod testMethod = new CodeMemberMethod(); testMethod.Name = 'Test' + mi.Name + '_' + intTestCaseCnt; testMethod.Attributes = MemberAttributes.Public;.....
here it creates a method programmatically now I want to create a hashtable so I am asking how?
1 Answer