Pregunta

I have a class library with the following method.

namespace TNAUtilities
{
    public class Database
    {
        public static DataView GetDataView(string query)
        {
            //actual implementation omitted, returns a DataView
        }
    }
}

I've used this method hundreds of times, the class library is a utility library I include in all my projects. However, now I'm working on a ASP.NET web site, and one of the web pages can't seem to see that method. The other pages in my site are able to see it.

using TNAUtilities; //top of class

//inside a method body
Database.GetDataView(query); // throws compilation error: 'Database' does not contain a definition for 'GetDataView'

This is the weirdest error I've seen. Intellisense is able to recognize it for code completion purposes, but Visual Studio 2010 Pro highlights the method call in blue. I actually call this method twice on the same page, both lines give the error. I tried doing a Build -> Clean Solution but it didn't help.

I've deployed the code to the server a couple of times, and the server reports the same issue. What could be the culprit here?

¿Fue útil?

Solución

May be in this particular context there is another class, field or namespace named Database?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top