M
msnews.microsoft.com
How can we access an internal class in a referenced file in a multi-file
assembly. All documentation states the obvious purpose of the internal
keyword on a class, but when referencing an assembly, I fear it means
single-file assembly. That means even if the assembly is strong-named and
versioned, it will not reach internal classes. So much for code reuse while
hiding classes from external objects. I can't find examples or explanations
of how to do this.
Here is a layout of the problem:
_______________________________________________
namespace ns1 (with strong name)
Lib1.dll --------------------------------------------------
internal Class1
public Class2
App1.exe ------------------------------------------------
- Problem - references Lib1.dll in this multi-file assembly but can
only reach Class1 if it is public (a bad thing).
_______________________________________________
namespace ns2 (without strong name - any external application)
App2.exe -------------------------------------------------
- No Problem - references Lib1.dll and can access Class2 but as
expected not Class1
Thanks for any response.
-VinceB
assembly. All documentation states the obvious purpose of the internal
keyword on a class, but when referencing an assembly, I fear it means
single-file assembly. That means even if the assembly is strong-named and
versioned, it will not reach internal classes. So much for code reuse while
hiding classes from external objects. I can't find examples or explanations
of how to do this.
Here is a layout of the problem:
_______________________________________________
namespace ns1 (with strong name)
Lib1.dll --------------------------------------------------
internal Class1
public Class2
App1.exe ------------------------------------------------
- Problem - references Lib1.dll in this multi-file assembly but can
only reach Class1 if it is public (a bad thing).
_______________________________________________
namespace ns2 (without strong name - any external application)
App2.exe -------------------------------------------------
- No Problem - references Lib1.dll and can access Class2 but as
expected not Class1
Thanks for any response.
-VinceB