| || |
How to make an instance of .Net interface
I am using .Net hashtable to store the name value pairs in my script. in order to read them I need to make reference of IDictionaryEnumerator interface.
QTP throws syntax error while I try the following code:
Set Enum = Dotnetfactory.CreateInstance("System.Collections.I DictionaryEnumerator")
Please reply soon.. Thanks a lot.
Re: How to make an instance of .Net interface
I don't think it makes sense to try to create an instance of an interface. You should try to create an instance of an object, which implements the interface or get a reference to the enumerator from the collection object instead.
<font class="small">Code:</font><hr /><pre>Hashtable.GetEnumerator()</pre><hr /> would give you the enumerator object.