我已經將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