我已经将MIDI.dll添加到程序集属性中,我是C#的新手,并且遵循MIDI.dot.net中的一个示例,并在device.Spec
上得到了此错误,Midi.InputDevice的含义不包含'spec'的定义,没有扩展方法'spec'接受Midi.InputDevice类型的第一个参数无法找到(你是否缺少使用指令...)?“foo不包含'bar'的定义...”是什么意思?
我的using MIDI
位于顶部,我使用MonoDevelop IDE。
public override void Run()
{
// Print a table of the input device names, or "No input devices" if there are none.
if (InputDevice.InstalledDevices.Count == 0)
{
Console.WriteLine("No input devices.");
}
else
{
Console.WriteLine("Input Devices:");
foreach (InputDevice device in InputDevice.InstalledDevices)
{
Console.WriteLine(" {0}", device.Spec);
}
}
Console.WriteLine();
// Print a table of the output device names, or "No output devices" if there are none.
if (OutputDevice.InstalledDevices.Count == 0)
{
Console.WriteLine("No output devices.");
}
else
{
MIDI dll从哪里来?错误基本上意味着您的输入设备没有属性名称“Spec”。你确定这样的财产存在吗? – 2010-11-02 12:34:49
重建midi.dll,您使用的版本显示已过时。源代码位于:http://code.google.com/p/midi-dot-net/source/browse/trunk/Midi/ – 2010-11-02 14:30:29