Is there a way to reference a certain class/interface/... by enclosing it with its namespace rather than a using directive "using namespace_name" ?!

Posted by Ahmed on Stack Overflow See other posts from Stack Overflow or by Ahmed
Published on 2011-01-17T11:40:35Z Indexed on 2011/01/17 11:53 UTC
Read the original article Hit count: 219

Filed under:
|
|
|
|

Is there a way to reference a certain class/interface/... by enclosing it with its namespace rather than a using directive "using namespace_name" ?!

As, I'm working on a website, which uses SAP .NET connector. I already added a reference for connector ddl, and while referencing its namespace "using namespace_name", or set class namespace to another one rather than connector namespace,

I got error regarding connector classes with that error message "The type or namespace couldn't be found, are you missing a using directive or an assembly reference?".

But while changing namespace name to connector namespace, everything is going well?!

// Set namespace to be IDestinationConfiguration interface namespace.
namespace SAP.Middleware.Connector
{
    public class ConnectorConfiguration : IDestinationConfiguration
    {
    }
}

So, connector types forced me to set namespace of class to their namespace!

Is this possible? If so, how?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET