Curious if I've messed up some Visual Studo settings that should be flagging this, or if I'm misunderstanding something entirely.
I have a funcion A which has 2 very basic interfaces as parameters:
- oConfiguration as IConfiguration
- oEventLogHandler as IEventLogHandler
Function B has a single parameter:
- oEventLogHandler as IEventLogHandler
Function A calls Function B, passing oConfiguration as an argument. I don't seem to get any compiler errors or warnings in Visual Studio but of course I get the runtime error:
Unable to cast object of type 'ConfigurationImplementationA' to type 'IEventLogHandler'.