Scripting.dictionary to c#

Posted by naresh on Stack Overflow See other posts from Stack Overflow or by naresh
Published on 2009-07-15T12:35:52Z Indexed on 2010/06/11 3:02 UTC
Read the original article Hit count: 314

Filed under:
|

Facing one problem please help me....

We are product development company and our existing application is in ASP, I am trying to send scripting.dictionary object to c#'s com visible class. I am using the System.Collections.Generic class here is my code

ASP:

dim dictForm 
set dictForm=CreateObject("scripting.dictionary")

dictForm("First") ="one" 
dictForm("Second") ="two" 
SET OBJMSGBOX = Server.CreateObject("DictionarySerializer.DictionarySerializer")
call OBJMSGBOX.ConvertDictionary(dictForm)

c#:

[ComVisible(true)] 
public class DictionarySerializer : IXmlSerializable {
 Dictionary dict = new Dictionary(); 
 public void ConvertDictionary(Dictionary dictionary) { 
       this.dict = dictionary; 
 }
}

I am getting error Invalid procedure call or argument: 'ConvertDictionary'

Please tell me where I am going in wrong way.

© Stack Overflow or respective owner

Related posts about c#

Related posts about scripting.dictionary