BUG: You receive a “Type mismatch” error message when you assign a value type variable to a property through COM InterOp in Visual Basic .NET or in Visual Basic 2005
Symptoms
When you assign a value to a property of a Component Object Model (COM) object in .NET, you may receive the following error message when you run your application:
An unhandled exception of type ‘System.Runtime.InteropServices.COMException’ occurred in InterOpDemo.exe
Additional information: Type mismatch
Resolution
The problem occurs if all of the following conditions are true: You are using the COM object in early bound mode.The property in the COM object has both Set and Let methods.You are trying to pass a value type variable to that property. In early bound mode, Microsoft Visual Basic .NET and Visual Basic 2005 always call the Set method of the property if it is available. If you want to call the Let method, you must explicitly specify it.
