0

我正在使用 C# 中的 VirtualBox 类型库,如下所示:

using System;
using System.Collections.Generic;
using System.Text;
using VirtualBox;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            IVirtualBox vbox = new VirtualBoxClass();

            IHost h = vbox.Host;

            Array a = h.USBDevices;           
        }
    }
}

行数组a = h.USBDevices; 导致 SafeArrayTypeMismatchException。有没有其他人有同样的问题?

谢谢!

4

1 回答 1

0
var a = (IUSBDevice[])h.USBDevices
于 2010-04-20T10:32:07.170 回答