Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

C# interop

How to convert COM Collection to .Net Collection



I want to assign Datasource to DataGrid in .Net.

ArrayList is not Working.
0
shaival_trivedi
Asked:
shaival_trivedi
1 Solution
 
danielsonchrisCommented:
>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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now