How to solved error Unable to cast object of type 'System.Int32' to type 'Microsoft.DirectX.Direct3D.VertexShader'
We want to case ''System.Int32' value into 'Microsoft.DirectX.Direct3D.VertexShader' I tried with CType but not working. Also tried mD3DDevice.VertexShader = CObj(D3DFVF_CUSTOMVERTEX_BOX) but no luck Can you please help