当前位置: 首页>>代码示例>>C#>>正文


C# Evidence.GetHashCode方法代码示例

本文整理汇总了C#中System.Security.Policy.Evidence.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# Evidence.GetHashCode方法的具体用法?C# Evidence.GetHashCode怎么用?C# Evidence.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Security.Policy.Evidence的用法示例。


在下文中一共展示了Evidence.GetHashCode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Equals_GetHashCode

		public void Equals_GetHashCode () 
		{
			Evidence e1 = new Evidence ();
			Evidence e2 = new Evidence ();
			Assert.AreEqual (e1.GetHashCode (), e2.GetHashCode (), "GetHashCode-1");
			Assert.IsTrue (e1.Equals (e2), "e1.Equals(e2)");
			e1.AddAssembly (String.Empty);
			e2.AddAssembly (String.Empty);
			Assert.AreEqual (e1.GetHashCode (), e2.GetHashCode (), "GetHashCode-2");
			e1.AddHost (String.Empty);
			e2.AddHost (String.Empty);
			Assert.AreEqual (e1.GetHashCode (), e2.GetHashCode (), "GetHashCode-3");
			Assert.IsTrue (e2.Equals (e1), "e2.Equals(e1)");
		}
开发者ID:narutopatel,项目名称:mono,代码行数:14,代码来源:EvidenceTest.cs

示例2: Equals_GetHashCode

		public void Equals_GetHashCode () 
		{
			Evidence e1 = new Evidence ();
			Evidence e2 = new Evidence ();
			AssertEquals ("GetHashCode-1", e1.GetHashCode (), e2.GetHashCode ());
			Assert ("e1.Equals(e2)", e1.Equals (e2));
			e1.AddAssembly (String.Empty);
			e2.AddAssembly (String.Empty);
			AssertEquals ("GetHashCode-2", e1.GetHashCode (), e2.GetHashCode ());
			e1.AddHost (String.Empty);
			e2.AddHost (String.Empty);
			AssertEquals ("GetHashCode-3", e1.GetHashCode (), e2.GetHashCode ());
			Assert ("e2.Equals(e1)", e2.Equals (e1));
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:14,代码来源:EvidenceTest.cs

示例3: Equals_GetHashCode

		public void Equals_GetHashCode () 
		{
			Evidence e1 = new Evidence ();
			Evidence e2 = new Evidence ();
			Assert.IsTrue (e1.GetHashCode () != e2.GetHashCode (), "GetHashCode");
			Assert.IsTrue (!e1.Equals (e2), "!e1.Equals(e2)");
			Assert.IsTrue (!e2.Equals (e1), "!e2.Equals(e1)");
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:8,代码来源:EvidenceTest.cs


注:本文中的System.Security.Policy.Evidence.GetHashCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。