- Remove the ambiguity by redefining or eliminating one of the methods at the source. You don’t need redundancy.
- If you do not control the source, include only one of them in your class file via the
using directive.
- If you still need both namespaces in the given class file, invoke the version you wish simply as a static class call, unambiguously identifying the method via the (potentially fully qualified) class name.
Abc.Xyz.ExtensionsClass.NoNull(database.ExecuteScalar(), string.Empty);
// <Abc.Xyz.> is only necessary if the classes themselves match names
// if not, only <ClassName>.<MethodName> is needed