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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -