How to use Internal , Protected Internal across Assemblies..
-
Hi can any body the sample code to declare a as protected Internal , as well as Internal to use across different assemblies.. Assembly1 define class as Protected Internal or Internal define member variables as Protected internal / internal eg. namespace Assembly1 { protected Internal class Assembly1Base { protected internal Member1; internal Member2; } } define anothe class derive from assembly1.Assembly1Base namespace Assembly2 { // inherit or create objects of above class } and access the different members
-
Hi can any body the sample code to declare a as protected Internal , as well as Internal to use across different assemblies.. Assembly1 define class as Protected Internal or Internal define member variables as Protected internal / internal eg. namespace Assembly1 { protected Internal class Assembly1Base { protected internal Member1; internal Member2; } } define anothe class derive from assembly1.Assembly1Base namespace Assembly2 { // inherit or create objects of above class } and access the different members
-
Hi can any body the sample code to declare a as protected Internal , as well as Internal to use across different assemblies.. Assembly1 define class as Protected Internal or Internal define member variables as Protected internal / internal eg. namespace Assembly1 { protected Internal class Assembly1Base { protected internal Member1; internal Member2; } } define anothe class derive from assembly1.Assembly1Base namespace Assembly2 { // inherit or create objects of above class } and access the different members
You can only use internal classes from files in the the assembly in which they're defined.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
Hi can any body the sample code to declare a as protected Internal , as well as Internal to use across different assemblies.. Assembly1 define class as Protected Internal or Internal define member variables as Protected internal / internal eg. namespace Assembly1 { protected Internal class Assembly1Base { protected internal Member1; internal Member2; } } define anothe class derive from assembly1.Assembly1Base namespace Assembly2 { // inherit or create objects of above class } and access the different members
http://msdn.microsoft.com/en-us/library/0tke9fxk(VS.80).aspx[^] This is the only way other than using reflection.
-
http://msdn.microsoft.com/en-us/library/0tke9fxk(VS.80).aspx[^] This is the only way other than using reflection.
Thanks this was useful..
-
Hi can any body the sample code to declare a as protected Internal , as well as Internal to use across different assemblies.. Assembly1 define class as Protected Internal or Internal define member variables as Protected internal / internal eg. namespace Assembly1 { protected Internal class Assembly1Base { protected internal Member1; internal Member2; } } define anothe class derive from assembly1.Assembly1Base namespace Assembly2 { // inherit or create objects of above class } and access the different members
Have a look at InternalsVisibleToAttribute http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx[^] This may help you. Decorate your Assembly1 with InternalsVisibleTo("Assembly2") and try to use the types in Assembly1 in Assembly2.
Do more work Make more mistakes Learn more things