WeakEventManager
想用一下這個,在學習C# 事件的時候,結果添加了Using System.Windows, WeakEventManager卻一直是紅色的,無法識別,報這個錯哦~
好不容易想用個高大上的弱事件,還找不到命名空間!解決啦!
stackoverflow上找到的答案哦~ 並非原創~ 馬克給牆內的小白看~
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'WeakEventManager' could not be found (are you missing a using directive or an assembly reference?) CarSale
用的是VS 2015
如何解決?
1. 點add reference~
2. Add reference : WindowBase
3. 大功告成啦~