I need to create a type that has two properties with the same name, and only differ on return type. Dynamically emitting this type via reflection is perfectly acceptable.
Something like this:
public TypeA Prop { get; }
public TypeB Prop { get; }
I do understand that I cannot consume this property from C# or VB.NET or lots of other .NET languages.
To prevent answers that explain to me why I don't want to do this, let me explain why I need it: I need it to reproduce a bug.
More specifically, I have a bug in AutoFixture where a Moq of a type will cause it to throw an exception in certain cases. The problem is that the type emitted by Moq contains two properties both named 'Mock' that differ only on the return type.
I would like to reproduce this scenario in a unit test, but I'd rather not take a dependency on Moq just for that single reason, so I'd like to reproduce the behavior internally in the test suite.