我想继承SpeechRecognizedEventArgs
:
public class AD_SpeechRecognitionEngineResult : SpeechRecognizedEventArgs
{
// public AD_SpeechRecognitionEngineResult():base() { }
//I get the same error whatever if I command this constructor declaration or not
}
编译器呻吟:
错误CS1729'SpeechRecognizedEventArgs'不包含 取0参数的构造函数
知道类继承这种方式::
public class SpeechRecognizedEventArgs : RecognitionEventArgs {}
public abstract class RecognitionEventArgs : EventArgs {} //this class only has a property but no declared constructor
和
public class EventArgs
{
...
public EventArgs();
}
为什么编译器不会将EventArgs
构造函数识别为AD_SpeechRecognitionEngineResult
类的0参数的有效构造函数?