c# - How to distinguish between two classes with the same name (and namespace) in 2 DLL's? -
i've got 2 dll's - common.dll
, cfw.infrastructure.sdk.dll
. both dll's contain following class:
cfw.common.hashing.blockhasher
i have test project references both dll's. when try test blockhasher, following error:
i test 1 in cfw.infrastructure.sdk.dll
. because qualified names same can't fix 'normal' using.
external aliasses can used.
1. add alias dll reference
open solution explorer. navigate dll , add alias
it.
2. reference alias
add following the c# file (must on top):
extern alias sdk;
3.add usings
distinguish:
i've added classes gave problems usings:
using blockhasher = sdk.cfw.common.hashing.blockhasher; using signingalgorithm = sdk.cfw.common.hashing.signingalgorithm;
4.done!
got idea extern alias walkthrough.
Comments
Post a Comment