Enter the following class:
public Person
{
public string Name {get; set;}
public string Age {get; set; }
}
If I wanted Return then, IList will return the list anyway, will there be all IList functionality, but with remote setters? Perhaps using an extension method to remove setters. I would suggest that you have to use reflection, but is this the only way to do this? Will it be feasible in terms of speed / implementation.
I'm just wondering how this can be done, this is not a real design. And I know that I simply return IEnumerable or IEnumerable with a pass or yield that would solve this problem.
thank
source
share