Convert COM object to .Net Object
问题 public int Set(int newValue,Object obj) { //System.Windows.Forms.Control ctrl = (System.Windows.FormsControl)Object; } The Object here is COM object. Now I want to convert it to a .NET object and get hold of its properties. What is the easiest way to do it? 回答1: You can't convert a COM object into a Windows.Forms.Control object directly. It isn't that specific type. The COM object should, if you use the correct type library, provide you with properties of its own. You should be able to use