CodeVariableDeclarationStatement hashTableParam = new CodeVariableDeclarationStatement();
hashTableParam.Name = "hastable";
hashTableParam.Type = new CodeTypeReference(typeof(System.Collections.Hashtable));
here i have created a hashtable data type using code dom . Now i want to use its in-built properties such that add,clear etc to me more clear i want to implement code similar to this one in code dom
ht.add("key","value");
i tried to do like this
CodeVariableDeclarationStatement hashTableParam = new CodeVariableDeclarationStatement();
hashTableParam.Name = "hastable";
hashTableParam.Type = new CodeTypeReference(typeof(System.Collections.Hashtable));
CodeMethodInvokeExpression invokeExp2 =
new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(hashTableParam.Name), "add");
invokeExp2.Parameters.Add(new CodeArgumentReferenceExpression("key"));
invokeExp2.Parameters.Add(new CodeArgumentReferenceExpression("value"));
// CodeStatementCollection statements = new CodeStatementCollection();
return hashTableParam;
but i am not able to link between invokeExp2 and hashtableparam .and is there any other solution to use in built properties here i am trying use it has user defined