Solved

vb.net to c# conversion

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scoresAverage challenge 8 75
add text to end of existing text in file 16 62
topping2 challenge 13 58
word0 challenge 4 52
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.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

15 Experts available now in Live!

Get 1:1 Help Now