部分代码
namespace RT
{
public delegete void FrameReceivedDelegate(byte[] Frame,int actuallyLength);
public class Decoder
{
public event FrameReceivedDelegate FrameReceived;
public void ProcessSignal(string text){
byte[] frame = new byte[text.Length/2];
.......
.......
.......
if(FrameReceived != null)
{
FrameReceived(frame,frameBitLength / 8);//这句话这里抛异常
}
}
}
异常
引发的异常:“System.InvalidOperationException”(位于 mscorlib.dll 中)
System.InvalidOperationException : 可为空的对象必须具有一个值
我查看public event FrameReceivedDelegate FrameReceived;
全部引用,发现只有这一处有用到这个
Console.WriteLine(ex.Message);
Console.WriteLine(ex.StackTrace);
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
有完整錯誤的callstack 嗎?
這樣看不太出來
通过InnerException 可以得到具体错误的详细信息