• 博客园Logo
  • 会员
  • 周边
  • 捐助
  • 新闻
  • 博问
  • 闪存
  • 赞助商
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 简洁模式 ... 退出登录
    注册 登录
金大鑫要坚持
博客园    首页    新随笔    联系   管理    订阅  订阅

【C# 小窍门】WeakEventManager 无法识别!ErrorCS0246The type or namespace name 'WeakEventManager' could not be found

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. 大功告成啦~

 

posted @ 2016-12-06 10:07  金大鑫要坚持  阅读(16044)  评论(0)  编辑  收藏  举报
会员力量,点亮园子希望
刷新页面返回顶部
Copyright © 2024 金大鑫要坚持
Powered by .NET 8.0 on Kubernetes