小编Mat*_*son的帖子

InvalidOperationException:撤消操作遇到的上下文与相应的Set操作中应用的上下文不同

我得到以下异常:

Exception Type: System.InvalidOperationException  
Exception Message: The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone).  
Exception Stack:   at System.Threading.SynchronizationContextSwitcher.Undo()  
at System.Threading.ExecutionContextSwitcher.Undo()  
at System.Threading.ExecutionContext.runFinallyCode(Object userData, Boolean exceptionThrown)  
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteBackoutCodeHelper(Object backoutCode, Object userData, Boolean exceptionThrown)  
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)  
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)  
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)  
at System.Net.ContextAwareResult.Complete(IntPtr …
Run Code Online (Sandbox Code Playgroud)

c# sockets asynchronous console-application

5
推荐指数
1
解决办法
1893
查看次数

使用.Net UserControl设计问题

我创建了一个包含其中的UserControl ListView.ListView可通过属性公开访问.当我将UserControl放在一个表单中并尝试设计ListView属性时,ListView一直保持这种状态,直到我再次编译并恢复到默认状态.

如何让我的设计更改坚持ListView

c# user-controls .net-2.0

3
推荐指数
1
解决办法
760
查看次数