为什么存在Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Equals()? [英] Why does Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Equals() exist?

查看:67
本文介绍了为什么存在Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Equals()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MSDN文档中有关Assert.Equals()的描述: 不要使用此方法.

Description for Assert.Equals() from the MSDN Documentation: Do not use this method.

就是这样,完整的解释.嗯..好吧,但是...为什么在那儿呢? 它是该框架的早期版本中不推荐使用的方法吗?应该只由其他Microsoft程序集使用的东西?

That's it, the full explanation. Uh.. ok, but then ... why is it there? Is it a deprecated method from an earlier version of the framework? Something that's supposed to be used only by other Microsoft Assemblies?

这让我想知道我不应该更多地使用它. ;-)

It just makes me want to use it all the more knowing I'm not supposed to. ;-)

有人知道吗?

推荐答案

.Equals继承自object.它被列为请勿使用此方法",因此用户不会将其与AreEqual方法混淆.

.Equals is inherited from object. It's listed as "Do not use this method" so users won't confuse it with the AreEqual method.

这篇关于为什么存在Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Equals()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆