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 591479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:38:20+00:00 2026-05-13T15:38:20+00:00

I am trying to have a datastructure of an abstract class so I can

  • 0

I am trying to have a datastructure of an abstract class so I can access a method of different objects implementing that abstract class. This is my code:

    using Subsync.App;
    List<App> installed_apps = new List<object>();
    public Views (string[] args)
            {
                //INSTALL APPS HERE.
                installed_apps.Add (new HelloWorld.HelloWorld ());
                //INSTALL END

                foreach (App app in installed_apps) {
                    foreach (KeyValuePair<string, List<object>> match in app.getTokens ()) {
                        tokens.Add (match.Key, match.Value);
                    }
                }

                //begin dispatch
                Dictionary<string,List<object>> tokenized = Tokenize(args);
                Dispatch(tokenized);
            }

In namespace Subsync:

public abstract class App
    {
        public abstract Dictionary<string, List<object>> getTokens ();
    }

In namespace HelloWorld:

public class HelloWorld : App
{

    public HelloWorld ()
    {
    }

    public override Dictionary<string, List<object>> getTokens ()
    {
        Dictionary<string, List<object>> ret = new Dictionary<string, List<object>> ();
        ret.Add("helloworld",new List<object>() {"0","-hw","-helloworld"});
        return ret;
    }
}

Compiling gives me the error

Error CS0246: The type or namespace
name `App’ could not be found. Are you
missing a using directive or an
assembly reference? (CS0246) (App)

All the code files are in the same project folder. What am I doing wrong? Thanks!

  • 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-13T15:38:20+00:00Added an answer on May 13, 2026 at 3:38 pm

    place abstract as the first class modifier, rather than public.

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

Sidebar

Related Questions

I am trying to have a method that takes in a username and will
So I'm trying to have a window that I can drag around by the
I am trying to solve this problem : https://www.spoj.pl/problems/CERC07S/ I have identified that i
I have a view that will look like this: I'm trying to figure out
I have a 3D datastructure in C code that I want to visualize as
I am trying to have a table like this: Manager Expert Adminis. Staff Dept
I have a Set object and I use this set to ensure that when
I have a set of structured data, that I'm trying to merge together, based
I am trying to make some data from database available using XML, I have
For a math package, I am trying to have classes for different types of

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.