为什么存在Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Equals()? [英] Why does Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Equals() exist?
问题描述
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屋!