Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:31:52+00:00 2026-06-11T07:31:52+00:00

I am trying to use an ArrayList, and bind it to a BindingList… If

  • 0

I am trying to use an ArrayList, and bind it to a BindingList…

If I try to put it in (I have Option Strict On), I get a suggestion for casting that I implemented –

Yet I keep getting a runtime error no matter what I try.

Unable to cast object of type 'ArrayList' to type 'IList`

The code:

Dim myBoundList As System.ComponentModel.BindingList(Of something) =
    New System.ComponentModel.BindingList(Of something)
      (CType(myArrayList, System.Collections.Generic.IList(Of something)))

I have tried to insert .ToArray…

The accepted answer at the link https://stackoverflow.com/a/8770832/1217150 does exactly the same thing (even though the intent is the opposite), and I have tried it… (I mean, creating an IList item, and assigning

IList iList = new ArrayList();

It gives me the same error…

I am using VB.NET, but c# would help too. Please help. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:31:53+00:00Added an answer on June 11, 2026 at 7:31 am

    You should check out using the generic List class (a .NET type) rather than using the non-generic ArrayList. I suspect this might be related to your problem. It’s probably trying to cast the non-generic ArrayList to an IList<T> (the generic version of IList).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i am trying to use SmartGWT . I have Arraylist ArrayList<FileDocument> documentsArrayList =
I am trying to use org.apache.commons.collections.CollectionUtils in android with following code import java.util.ArrayList; import
I am trying use gem tire to search in my application. I have tables
Hi I'm trying use a datepicker on a field I have. I'm trying to
I'm trying to use an arraylist as the parameter to String.Format. msg = msg
I'm new to C and I'm trying to use an Arraylist library. The create
I am trying to use generics to create an object that can be a
I have been trying to use the same HttpClient instance throughout different activities, but
I have created a custom Array Adapter to bind a custom row that contains
i am trying to use an arraylist to build a graph using fusionfree however

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.