Need help with the an error in my development

Error code:  'A' does not contain a definition for 'B' and no extention method 'B' accepting a first argument of type 'A' could be found ( are you missing a using directive or an assembly reference?)

A - is the BusinessLogicLayer.IDropdownLists class
B - is the name of the dropdown list I'm adding to the application   DropDownList_Instructors

Below is the code that applies to this issue.

BusinessLogicLayer.IDropDownLists
Using System.Collections.Generic;
Public interface IDropDownLists
{      IDictionary<string, string> DropDownList_SearchOptions { get;}
        IDictionary<string, string> DropDownList_DateControl { get;}
        IDictionary<string, string> DropDownList_STGSet( int GroupID ); 
        IDictionary<string, string> DropDownList_UnitByFacility( int FacilityID );
        IDictionary<string, string> DropDownList_Location_Administration { get;}
        IDictionary<string, string> DropDownList_Reason_Administration { get;}
        IDictionary<string, string> DropDownList_Instructors { get; }
    }

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using BusinessLogicLayer;

namespace UIProcessLayer
{
    public class Administration
    {
        static private IAdministration Administration1
        {
            get{ return BusinessLogicLayer.Administration.Create(); }
        }
        #region Administration : Dropdownlists
UIProcessLayer.Administration
{  ……..
	 public static IDictionary<string, string> DropDownList_SecurityGroup()
        {
            return Administration1.dropDownLists.DropDownList_SecurityGroup;
        }
        public static IDictionary<string, string> DropDownList_Grant_Security_Level_Screen_
SecurityGroup(int FacilityID)
        {
            return Administration1.dropDownLists.DropDownList_Grant_Security_
Level_Screen_SecurityGroup( FacilityID );
        }
        public static IDictionary<string, string> DropDownList_Facility_Search()
        {
            return Administration1.dropDownLists.DropDownList_Facility_Search;
        }
        public static IDictionary<string, string> DropDownList_Reason_Administration()
        {
            return Administration1.dropDownLists.DropDownList_Reason_Administration;
        }
        public static IDictionary<string, string> DropDownList_Location_Administration()
        {
            return Administration1.dropDownLists.DropDownList_Location_Administration;
        }
        public static IDictionary<string, string> DropDownList_Instructors()
        {
            return Administration1.dropDownLists.DropDownList_Instructors;
        }

Open in new window

SherryDeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris Raisin(Retired Analyst/Programmer)Commented:
Have you actually defined a member of the class BusinessLogicLayer.IDropdownLists anywhere in your code (code external to the class code you have shown)?

Perhaps the compiler is getting confused between a call to the System dropdownlist and a call to "A" so you need "a" to be be defined somewhere in your code.

I suspect the error is not actaully happening in the code you supplied, but rather in a process using an instance that is supposed to be of type BusinessLogicLayer.iDropdownlist but is not actaully defined in your code
(I hope this makes sense).

Can you not state WHERE the error is happening (or is it preventing a compile and appears before the run?)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
käµfm³d 👽Commented:
Agree with the above:  It helps us to know which line throws the error.

Side comment:

A - is the BusinessLogicLayer.IDropdownLists class
I'm hoping this was just a misuse of terminology. The convention in .NET is to define interfaces with names that begin with a capital "i" (e.g. IEnumerable, IList, IDataReader, etc.). Classes should not start with an "i" unless it is a word (e.g. Invention, IceCube, Igloo).
0
Chris Raisin(Retired Analyst/Programmer)Commented:
No, I think the author is just using "A" and "B" to save having to type the complete error message (which would have been very long). I gather he is substituting A & B into the error message typed out.
The author also appear to be correctly using the Interface "I" starting letter since I gather the code is for Interface, not class.

I am actually a VB.Net programmer, but all is very similar.

I'd guess maybe the error does not throw on a line, but is rather an error prior to a build/execute since the compiler cannot find a referenceto what the author has designated "A" in the error message, namely the
"BusinessLogicLayer.IDropdownLists" and so it cannot find a variable that has been defined to that class. (All very confusing!)
Maybe he can make sense of this....This error message normally means there is basically a missing reference, either in the code (as in this case) or via the
Project Explorer "References" interface.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

käµfm³d 👽Commented:
@craisin

I was referring to:

...IDropdownLists class

= )
0
Chris Raisin(Retired Analyst/Programmer)Commented:
Yes, that is correct.

The compiler is saying that nothing has been defined as being a member of that class.

It can find no refence to an instance of that class, so you need to instantiate an instance variable of that
class, such as:           IDrop   IDrop1 = new IDropdowlist();

(I am not a C# programmer so I am just guessing the format of this declaration.
In VB.Net is would be  :         Dim  IDrop1 as IDropDowList

Either taht,or (as it says) "are you missing a using directive or an assembly reference?"

Should you have some missing "Using" statemant at the top of your code (either in the class code or external to it).

This error seems to commonly occur also when you have an identifier with the same name as something in a "Using" library (e.g. if you named a variable "Form" you would get this error, since the program would not know if you meant System.IO.Form or the variable named "Form".

Do a Google search on your error message (use the exact wording, the search will find all those similar to it) and there are hundreds of hits. Maybe one of those may help you out (particularly once involving C#)

Cheers
Chris (Melbourne)
0
SherryDeveloperAuthor Commented:
You were right.  This is my first time adding something to an application.  I'm new to programming in fact.  There was another place I missed adding another line of code.  I was adding an Instructor dropdown list as a parameter for one of the repors that we run from the application.  It passes the parameter to reporting services for the report.  Thank you.
0
Chris Raisin(Retired Analyst/Programmer)Commented:
My pleasure.

For the sake of clarity for others reading this solution, , could you please state the line of code which you added which fixed the problem, or state the "Using" line you added which satisfied the assembly reference?

Many thanks

Chris (Melbourne)
0
SherryDeveloperAuthor Commented:
Will do, I'll have to go back through it.  But I will as soon as I can and will remember to in the future.  Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.