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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:43:52+00:00 2026-06-01T16:43:52+00:00

I have created folders in my project named Classes, Forms, and Models. Let’s say

  • 0

I have created folders in my project named Classes, Forms, and Models.

Let’s say my project is named ABC, so the folder hierarchy is:

ABC
    Classes
    Forms
    Models

In \Models\, I have a class named ApplicationModel.cs, which contains a public method named GetApplications().

However, when I call that method from elsewhere in the same ABC project, I get, “The name ‘GetApplications’ does not exist in the current context”

I’ve added:

using ABC.Models;

to the calling class, but it makes no difference. I right-clicked GetApplications() to hopefully see “Resolve” there, but no go.

What must I do to access my own public method?

  • 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-01T16:43:53+00:00Added an answer on June 1, 2026 at 4:43 pm

    It would be helpful to see the definition of GetApplications() and the code that’s attempting to call it, but I assume it’s either a static or an instance method of the ApplicationModel class. In either case, you may have made your code aware of the namespace of the ApplicationModel class with the using statement, but the method must either be called on the class or an instance of the class, like so:

    If GetApplications is a static method,

    var applications = ApplicationModel.GetApplications();
    

    If it’s an instance method:

    var appModel = new ApplicationModel(); // or, retrieve the instance from elsewhere...
    
    var applications = appModel.GetApplications();
    

    One way or another, you must refer to the class containing GetApplications in order to call it. If this doesn’t help you solve the problem, please edit your question to contain the definition of the method, and the calling code.

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

Sidebar

Related Questions

I have created a group folder in my Xcode project named USER_PHOTO Then I
I have created a new folder in my project, aptly named 'images'. I have
should i after i have created a svn repo, import one project folder into
For a new project I have created a local folder tree with empty Visual
So within my project tracked by subversion, I have a folder (let's call it
I noticed that I had a project named RemoteSystemTempFiles which I never have created.
I have created an activity called viewActivity. It displays the shared files and folders
I created layout and layout-land folders, in Manifest i have android:configChanges=keyboardHidden|orientation If i remove
i have created folder on my server (ie finesse)- 'home' in which i have
I have one created one folder called MYFOLDER inside my folder in have one

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.