oop - Limit access to a Class library in C#.NET -
i have c# class library going used in 2 different projects. 1 of them should access public classes , methods , other 1 should access of classes , methods .
what best solution ?
i think best bet internalsvisibleto
attribute
ordinarily, types , members internal scope (in c#) , friend scope (in visual basic) visible in assembly in defined. internalsvisibletoattribute attribute makes them visible types in specified assembly, known friend assembly. attribute applied @ assembly level. means can included @ beginning of source code file, or can included in assemblyinfo file in visual studio project
of course doesn't prevent people calling methods using reflection
Comments
Post a Comment