Limiting access to a public setter to specific objects (C#)

前端 未结 6 1340
春和景丽
春和景丽 2021-01-16 09:48

I\'m trying to create a class (in C#) that serves as an environment for my application.

I\'m trying to make the class dynamic, and send it as a parameter to entities

6条回答
  •  悲&欢浪女
    2021-01-16 09:50

    You could try using Friend assemblies. That will allow only the assemblies you specify to have access to your privates (snicker).

提交回复
热议问题