471,321 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Possible to use an "internal" class in an external assembly?

I've got a third-party assembly dll containing an "internal" class with
some public methods I would very much like to use.

I understand the meaning and reason of setting the accessibility of the
class to internal. But is there any way, dirty or not, I could use this
class and its methods anyway?
Feb 17 '06 #1
6 1706

"John Nossluap" <no******@nodomain.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I've got a third-party assembly dll containing an "internal" class with
some public methods I would very much like to use.

I understand the meaning and reason of setting the accessibility of the
class to internal. But is there any way, dirty or not, I could use this
class and its methods anyway?


You want to go out of your way to make your app unmaintainable and to ensure
that a third party can break it in weird and unpredictable ways just by
issuing an upgrade?

Try reflection.
Feb 17 '06 #2
Nick Hounsome wrote:
You want to go out of your way to make your app unmaintainable and to ensure
that a third party can break it in weird and unpredictable ways just by
issuing an upgrade?
Yah, I'm developing a proof-of-concept prototype for a small audience so
the application's ttl doesn't really matter ;)
Try reflection.


You know for sure its doable or is it just a wild guess?

Thanks for you answer.
Feb 17 '06 #3
Hi,

"John Nossluap" <no******@nodomain.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Nick Hounsome wrote:
You want to go out of your way to make your app unmaintainable and to
ensure that a third party can break it in weird and unpredictable ways
just by issuing an upgrade?


Yah, I'm developing a proof-of-concept prototype for a small audience so
the application's ttl doesn't really matter ;)
Try reflection.


You know for sure its doable or is it just a wild guess?


This is easily checkable, it would take you 10 min to write the code and
see if it works or not

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 17 '06 #4
John Nossluap wrote:
Nick Hounsome wrote:
You want to go out of your way to make your app unmaintainable and to ensure
that a third party can break it in weird and unpredictable ways just by
issuing an upgrade?


Yah, I'm developing a proof-of-concept prototype for a small audience so
the application's ttl doesn't really matter ;)
Try reflection.


You know for sure its doable or is it just a wild guess?

Thanks for you answer.


It's doable so long as you're in a high trust environment - in other
words, if the system has been told to trust your code to do whatever it
likes, you should be fine.

Jon

Feb 17 '06 #5
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

This is easily checkable, it would take you 10 min to write the code and
see if it works or not


All truths are easy to understand once they are discovered; the point is
to discover them.
Feb 17 '06 #6
Jon Skeet [C# MVP] wrote:
John Nossluap wrote: It's doable so long as you're in a high trust environment - in other
words, if the system has been told to trust your code to do whatever it
likes, you should be fine.


Sounds acceptable, I'll give it a shot. Thanks.
Feb 17 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Will Hartung | last post: by
5 posts views Thread by Andrew R. Thomas-Cramer | last post: by
4 posts views Thread by David Sworder | last post: by
2 posts views Thread by Brian Henry | last post: by
4 posts views Thread by ~~~ .NET Ed ~~~ | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.