About This eBook by Bart De Smet

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Extern Aliases

Despite the fact naming conventions for namespaces and types exist, it’s still possible to end up with ambiguities across different assemblies. One more or less common case is when multiple versions of an assembly need to be referenced (for example, for compatibility scenarios). Those assemblies might have the same namespace and type names, so a new ambiguity arises: Whose assembly’s namespace or type is being referred to?

Figure 24.12 shows what happens if both those assemblies contain the following namespace and type, which we attempt to use from our code:

namespace Bar{    public class Foo    {    }}

Image

FIGURE 24.12 Referenced assemblies ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required