Solved

vb.net to c# conversion

Posted on 2004-10-06
1
204 Views
Last Modified: 2010-04-17
Assuming that companyInfo is a class i defined and added an instance of it to an ArrayList, such as
CompanyInfo x = new CompanyInfo();
ArrayList aL = new ArrayList();
//assign value to x

aL.Add(x);

How can i convert this line of VB.NET

Return CType(c.ToArray(GetType(CompanyInfo)), CompanyInfo())

To C# and get the same affect?

The return type of this function is CompanyInfo.

0
Comment
Question by:CDFA_Inc
1 Comment
 

Accepted Solution

by:
djarn earned 125 total points
ID: 12242644
return (CompanyInfo[])c.ToArray(typeof(CompanyInfo))
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

679 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