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

  • Home
  • SEARCH
  • 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 7180605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:23:01+00:00 2026-05-28T17:23:01+00:00

I have a function eventIterable() in six different classes, each with different names. These

  • 0

I have a function eventIterable() in six different classes, each with different names. These classes are being stored in an Object[].

I have a custom ArrayList class (I had to create my own – long story, don’t bother suggesting I use the standard one), and within it, you can access indexes from the ArrayList.

Each of these class objects are stored at an index in the array list. However, since the type of the array is Object, I can’t call the functions. I can’t change from Object to a specific class because each of the classes is unique. They all share the eventIterable() function, however.

The goal is to be able to iterate through all of the classes in the ArrayList, and run the eventIterable() function within each class.

  • 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-05-28T17:23:02+00:00Added an answer on May 28, 2026 at 5:23 pm

    You should create an interface containing the eventIterable() method, and make all of the classes implement that interface.

    You can then use a list of that interface rather than a list of objects.

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

Sidebar

Related Questions

If I have function names stored as strings in a Hashtable. Is there a
I have two classes, Database and User. In the Database class I have function
I have function which takes in an parameter of a class called Triple, and
I created a class: class A: aList = [] now I have function that
I have function that have been colled in stored procedure. The function returns a
I have function with simple sql query to list tickets on the page: class
I have function which append div (help icon) after all element with .help class.
I have function along these lines: public void view(string msg) { messagebox.show(msg); } .
I have function like this: function update_List(){ LIST=[]; $.each(feed_urls,function(index,value){ $.getJSON(value, function(data) { $.each(data.feed.entry,function(i,val){ LIST.push(val.content.src);
I have function as below . public static object getClassInstance(string key, object constructorParameter) {

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.