vb.net to c# conversion

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.

CDFA_IncAsked:
Who is Participating?
 
djarnConnect With a Mentor Commented:
return (CompanyInfo[])c.ToArray(typeof(CompanyInfo))
0
All Courses

From novice to tech pro — start learning today.