Solved

C#  interop

Posted on 2004-04-20
3
321 Views
Last Modified: 2012-08-13
How to convert COM Collection to .Net Collection



I want to assign Datasource to DataGrid in .Net.

ArrayList is not Working.
0
Comment
Question by:shaival_trivedi
3 Comments
 
LVL 5

Accepted Solution

by:
danielsonchris earned 50 total points
Comment Utility
>How to convert COM Collection to .Net Collection
Add a reference to the COM object via the menu:  Project->"Add Reference" Dialog.  Select the COM tab and find your library to incorporate.  .Net will quickly convert an interop library set that will be your middle-man in talking with the COM library.  
Next you will need to tell .Net that you want to use the library in your code by declaring...

using Excel;  //let's say I incorporated the office 2000 COM libraries.
//now at this point you can begin making calls into the COM library.

>I want to assign Datasource to DataGrid in .Net.
>ArrayList is not Working.

make sure that you have the following library set at the top of your page..

using System.Collections;

if ArrayList is still not working... is this a Web Application or Windows Application?  When calling the ArrayList can we see a code snippit?
Best of luck,
Chris
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
FizzBuzz challenge 9 71
ClickOnce Install - Shortcut Question 3 57
array220 challenge 8 44
Not needed 13 52
I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now