Suppose we had a generated class with a lot of redundant accessories. They are just accessors, they are not fields. They are not called anywhere. They just sit being redundant and ugly.
For instance:
public class ContrivedExample
{
public int ThisOneIsUsed { get; set; }
public int ThisOneIsNeverCalled0 { get { } }
public int ThisOneIsNeverCalled1 { get { } }
public int ThisOneIsNeverCalled2 { get { } }
public int ThisOneIsNeverCalled99 { get { } }
}
ContrivedExample c = new ContrivedExample() { ThisOneIsUsed = 5; }
The only costs I can think of is that this will make the DLL bigger. I expect there will be penalties during execution time.
Does this cause other overhead? Even tiny overhead of any kind?
source
share