Solved

vb.net to c# conversion

Posted on 2004-10-06
1
200 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
A short article about problems I had with the new location API and permissions in Marshmallow
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

896 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

14 Experts available now in Live!

Get 1:1 Help Now