.NET Framework 已弃用接口和属性。由于缺乏支持,您最大的重构是什么?
自新框架版本出现以来,一些 .net-framework 接口和属性已过时和弃用。有人警告我,此类代码可能会在下一个版本中被删除或变得不可预测,但是您是否曾经遇到过由于代码无法编译或开始表现奇怪而被迫重构代码的情况?你最大的重构是什么?
或者也许微软在 API 发布后总是继续支持它们?
先感谢您!
Some .net-framework interfaces and attributes become obsolete and deprecated since new framework version appears. I am warned that such code may be removed or become unpredictable in next versions but have you ever faced the situation when you were forced to refactor code because code came uncompilable or start to behave weird? What was you biggest refactoring?
Or maybe Microsoft always continued to support api's once they were published?
Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上根本没有重构。从.NET 1.1转换到2.0时,为了兼容性自动生成了很多东西,我又把它们拿出来了,因为没有必要。当引入泛型时,一些代码可以得到改进,但对我来说,现有的代码破坏几乎没有问题。
Practically no refactoring at all. When converting from .NET 1.1 to 2.0, there was a lot of stuff that was automatically generated for compatibility, which I took out again because it wasn't necessary. Some code could be improved when generics was introduced, but there have been almost no issues with existing code breaking for me.