Is there a way to reference a certain class/interface/… by enclosing it with its namespace rather than a using directive “using namespace_name”?

Public class ConnectorConfiguration: SAP.Middleware.Connection. IDestinationConfiguration { } You can write all your code without usings if you like, you just need to use the fully qualified namespace name for every class/interface where the using isn't used If you try this: using SAPTEST = SAP.Middleware. Connection; namespace TestNamespace { public class ConnectorConfiguration: SAPTEST.

IDestinationConfiguration { } } If that works, but it doesn't work if you remove SAPTEST, then IDestinationConfiguration must be declared in another namespace too.

Public class ConnectorConfiguration: SAP.Middleware.Connection. IDestinationConfiguration { } You can write all your code without usings if you like, you just need to use the fully qualified namespace name for every class/interface where the using isn't used. If you try this: using SAPTEST = SAP.Middleware.

Connection; namespace TestNamespace { public class ConnectorConfiguration: SAPTEST. IDestinationConfiguration { } } If that works, but it doesn't work if you remove SAPTEST, then IDestinationConfiguration must be declared in another namespace too.

Not only IDestinationConfiguration interface, I should do this for each type of connector types, but if enclose the class with SAP.Middleware. Connector as a namespace name, everything is going well! – Ahmed Jan 17 at 11:50 Yes, I know about fully qualified namespace, but this is not the problem.

– Ahmed Jan 17 at 11:50 Yes, because if you write your code in a given namespace then that namespace is 'automatically' in scope. But you don't need to do this. You can use using, or you can explicitly fully qualify types.

– James Gaunt Jan 17 at 11:51 Using a using directive isn't resolve the issues, I've to set namespace to the namespace of connector tyes rather than using directive. – Ahmed Jan 17 at 11:53 Ah I see. Can you post the code that fails.

I can only see 2 possible errors, either you're making a mistake in the syntax, or one of your types is in two different namespaces (i.e. Even with using you are still getting a type name clash). – James Gaunt Jan 17 at 11:55.

E.G. If it is declared as a protected then it would explain why it works in the first example as your ConnectorConfiguration class is in the same namespace. Namespace SAP.Middleware. Connector { // In the same namespace so it has access to the interface.

Public class ConnectorConfiguration : IDestinationConfiguration { } } If this was the case then the second example would not have access to the interface. Using SAP.Middleware. Connector; public class ConnectorConfiguration : IDestinationConfiguration { } Edit: Is your code EXACTLY as posted above?

If so, the second class is not within a namespace.

Wouldn't it be, if the IDestinationConfiguration isn't public, the ConnectorConfiguration can't be public as well. So if it works inside the namespace, it couldn't be public at all? But it does work with public ConnectorConfiguration.So that wouldn't be it?

– Marnix Jan 17 at 12:31 Yes, it's a public interface. – Ahmed Jan 17 at 12:33 Yes, the posted code is the one I've. – Ahmed Jan 17 at 12:42.

I ran into this too and couldn't figure it out until I finally found the answer on a post at forums.sdn.sap.com/thread.jspa?threadID=..., "Also, make sure your target framework is ". NET v4.0" NOT ". NET v4.0 Client" -- that way you get the System.

Web namespace that is required. " My project was targeting 4.0 client target framework. Once I changed it to just .

NET Freamework 4.0, all the references worked as expected.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions