Solved

C#  interop

Posted on 2004-04-20
3
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
danielsonchris earned 50 total points
ID: 10879321
>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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.

738 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