Replies: 1 comment 1 reply
-
does making the setter of indexer interface IExample
{
int this[int index] { get; }
}
class Example : IExample
{
public int this[int index]
{
get => 114514;
internal set => Console.WriteLine(value);
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there ways to disable access to get or set method of property only?
I need in strong sandboxing by interfaces and not any more.
For example some interface can include only get method, but implementation can contains also set method.
I use approach below, but it can ignore only whole property including get and set.
Beta Was this translation helpful? Give feedback.
All reactions