猿问

调用List<T>的Clear()方法报System.IndexOutOfRangeException,具体如下

at System.Array.Clear(System.Array, Int32, Int32)   at System.Collections.Generic.List`1[[System.Byte, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Clear()   at Kael.SocketIOCP.Share.Share.BufferManager.Init()   at Kael.SocketIOCP.Server.SocketServerSuper.BeginReceive(System.Net.Sockets.SocketAsyncEventArgs)   at Kael.SocketIOCP.Server.SocketServerSuper.Asyn_Completed(System.Object, System.Net.Sockets.SocketAsyncEventArgs)   at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs)   at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(System.Object)   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)   at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(System.Net.Sockets.SocketError, Int32, System.Net.Sockets.SocketFlags)   at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)   求解决方法
杨魅力
浏览 508回答 2
2回答

守着一只汪

额,那么有缘,上午我发个问题,过了一会你的问题出现在我的问题上方,下午又来了,我来捧个场
随时随地看视频慕课网APP
我要回答