convert array of objects to ICollection

Posted on 2005-05-09
Last Modified: 2008-03-17
how can I convert an array of objects into an ICollection?

I am attempting to add an array of type Object to an ArrayList.

 Dim items(combo1.Items.Count - 1) As Object
Dim ic As ICollection
ic = CType(items, ICollection)
Dim al As New ArrayList

(this is giving me an error)
Question by:brokeMyLegBiking
    1 Comment
    LVL 62

    Accepted Solution

    Just do the following.

    Dim al As New ArrayList

    Combo1.Items is already a collection.

    ICollection is an interface and all of it functionality must be programmed by you.

    I hope this was of some help

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    This video discusses moving either the default database or any database to a new volume.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    732 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

    18 Experts available now in Live!

    Get 1:1 Help Now