Tech Off Post

Single Post Permalink

View Thread: Casting generic interfaces
  • User profile image

    Yeah, I considered that, but it adds to the complexity of the code. There are going to be something like 250 business objects with an average of 20 properties in each, and even though they're generated, it's still a bunch more code.

    If I hit performance issues I'll add overrides for the relevant classes, but since these indexers are used in fairly low-volume operations like web binding, I'm not worried at the moment.

    Actually, even if I was doing that, I'd still be tempted to use Emit to generate the switch methods at runtime.

    Plus, it's nice to have it built into the framework functionality instead of the generator.