c# - Same class name and assembly name in .net -


i have class mycomponent in project being contained in assembly(myassembly). class being used @ many places in project parameter of various functions or variable type e.g.

private void mymethod(mycomponent com) {   //method implementation }  mycomponent varcom; 

but want include assembly has same name class i.e. mycomponent. whenever include assembly, wherever mycomponent being used start showing error

"'mycomponent' 'namespace' used 'type'".

one way resolve give full path reference path @ places mycomponent variable shown below.

myassembly1.mycomponent varcom; 

but require lot of code changes dont want do. there other way out problem

p.s error "'mycomponent' 'namespace' used 'type'"

i think simplest solution in context renaming mycomponent class refactoring before reference other assembly. right click class name, refactor, rename. should automatically update class name everywhere it's used.

or same mycomponent name space.


Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -