
Originally Posted by
TheAJ
use the "protected internal" modifier. This allows access only to what's within the assembly:
Code:
public class Foo
{
protected internal void DoSomething()
{
...
}
}
Eg:
namespace = Assembly1 = allowed
namespace = Assembly1.Sub = allowed
namespace = Assembly2 = denied
Unless i did not yet what your meaning?
What I'm trying to do is to prevent unwanted access to methods and such in my library.
I've already done something like
Code:
public Foo(string password, int id, int header, string body)
{
//Code that I'm too lazy to add here. :P But hashes the passwords and stuff and compares them to what they should be
}
---------- Post added at 07:31 PM ---------- Previous post was at 07:30 PM ----------

Originally Posted by
jMerliN
There are a N + 1 ways, the simplest is to use ordinals because it throws off what the exported functions really do.
Other ways are much more complex but much more effective, etc. A common one is to make 1 export but only pass a bunch of callbacks through, etc.
I digress, however, that since your stuff is C#, if someone wants to know something, they'll just decompile it. Hf.
C# can't be decompiled...or can it?
I read an article how the most decompilers do is take the EXE and spit out ASM.