473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Use of Scripting.Dictionary in C#

Hi All,
I have a VB COM component that has an object of type
Scripting.Dictionary. Each element of this again has
Scripting.Dictionary type members.
I need to access this in C#, and am not able to do so.
Could anyone provide me with source code for the same?

Thanks in Advance.
Regards,
--Jaffar

Jul 27 '06 #1
3 7518
Did u try this
http://samples.gotdotnet.com/quickst..._NET2COM.aspx?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


"ja*********@gmail.com" wrote:
Hi All,
I have a VB COM component that has an object of type
Scripting.Dictionary. Each element of this again has
Scripting.Dictionary type members.
I need to access this in C#, and am not able to do so.
Could anyone provide me with source code for the same?

Thanks in Advance.
Regards,
--Jaffar

Jul 27 '06 #2
I have successfully put a reference to the DLL, that's not a problem.
The thing is that the object I'm trying to access has a
Scripting.Dictionary, where each member is also a Scripting.Dictionary,
and I'm not getting what type to cast the inner member; an object array
cast is failing.

Michael Nemtsev wrote:
Did u try this
http://samples.gotdotnet.com/quickst..._NET2COM.aspx?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


"ja*********@gmail.com" wrote:
Hi All,
I have a VB COM component that has an object of type
Scripting.Dictionary. Each element of this again has
Scripting.Dictionary type members.
I need to access this in C#, and am not able to do so.
Could anyone provide me with source code for the same?

Thanks in Advance.
Regards,
--Jaffar
Jul 27 '06 #3
<ja*********@gmail.comwrote:
I have successfully put a reference to the DLL, that's not a problem.
The thing is that the object I'm trying to access has a
Scripting.Dictionary, where each member is also a Scripting.Dictionary,
and I'm not getting what type to cast the inner member; an object array
cast is failing.
Well, what happens if you call GetType() on the item which you can't
cast? What type is returned?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jul 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rodd Snook | last post by:
I have an application which makes extensive use of the Scripting.Dictionary object. I'm not doing anything silly like putting them outside the page scope -- just creating quite a few of them and...
9
by: What-a-Tool | last post by:
Dim MyMsg Set MyMsg = server.createObject("Scripting.Dictionary") MyMsg.Add "KeyVal1", "My Message1" MyMsg.Add "KeyVal2", "My Message2" MyMsg.Add "KeyVal3", "My Message3" for i = 1 To...
2
by: Tim Chmielewski | last post by:
I have been trying to read values from a form into an array on a page without much success and was told to use a Scripting.Dictionary instead. There are a variable number of fields on the form as...
2
by: Vaibhav | last post by:
dear all, i wonder if someone help me.. i am trying the create a dictionary obejct in asp but its giving the error Error Type: (0x8002801D) Library not registered
1
by: Vaibhav | last post by:
Dear all i am trying to create a dictionary object, i have written the code as..... Set objSD = CreateObject("Scripting.Dictionary") but its giving the error as Library not registered.
17
by: Karl Irvin | last post by:
To use the Textstream object, I had to set a Reference to the Microsoft Scripting Runtime. This works good with A2000 Is the Scripting Runtime included with A2002 and A2003 so the Reference...
1
by: Adnan | last post by:
Hi, I am porting an existing ASP applcation to ASP.NET which heavily depends on Mainpulation through Scripting.Dictionary. Can anyone help me out with an alternative to use of Scripting.Dictionary....
8
by: Howard Kaikow | last post by:
Historically, auntie virus software has issued false positives against code using the Scripting Runtime. Does .NET have a native replacement for the Scripting runtime? For example, is there...
6
by: Oenone | last post by:
Could someone suggest a good native .Net collection object that provides similar functionality to the COM Scripting.Dictionary object? Specifically I need to be able to add items with an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.