IndexOf() публичный метод

public IndexOf ( System value ) : int
value System
Результат int
		public void Insert () 
		{
			X509CertificateCollection c = new X509CertificateCollection ();
			c.Add (x509a);
			Assert.AreEqual (0, c.IndexOf (x509a), "a=0");
			c.Add (x509c);
			Assert.AreEqual (1, c.IndexOf (x509c), "c=1");

			c.Insert (1, x509b);
			Assert.AreEqual (1, c.IndexOf (x509b), "1");
			Assert.AreEqual (2, c.IndexOf (x509c), "2");
		}
		public void Insert () 
		{
			X509CertificateCollection c = new X509CertificateCollection ();
			c.Add (x509a);
			AssertEquals ("a=0", 0, c.IndexOf (x509a));
			c.Add (x509c);
			AssertEquals ("c=1", 1, c.IndexOf (x509c));

			c.Insert (1, x509b);
			AssertEquals ("1", 1, c.IndexOf (x509b));
			AssertEquals ("2", 2, c.IndexOf (x509c));
		}
		public void IndexOf () 
		{
			X509CertificateCollection c = new X509CertificateCollection ();
			Assert.AreEqual (-1, c.IndexOf (x509a), "Empty-A");
			Assert.AreEqual (-1, c.IndexOf (null), "Empty-Null");

			c.Add (x509a);
			Assert.AreEqual (0, c.IndexOf (x509a), "A-A");
			Assert.AreEqual (-1, c.IndexOf (x509b), "A-B");

			// works by object reference (not value)
			X509Certificate x = new X509Certificate (cert_a);
			Assert.IsTrue (!Object.ReferenceEquals (x509a, x), "!ReferenceEquals");
			Assert.AreEqual (0, c.IndexOf (x), "A-x");
		}
		public void IndexOf () 
		{
			X509CertificateCollection c = new X509CertificateCollection ();
			AssertEquals ("Empty-A", -1, c.IndexOf (x509a));
			AssertEquals ("Empty-Null", -1, c.IndexOf (null));

			c.Add (x509a);
			AssertEquals ("A-A", 0, c.IndexOf (x509a));
			AssertEquals ("A-B", -1, c.IndexOf (x509b));

			// works by object reference (not value)
			X509Certificate x = new X509Certificate (cert_a);
			Assert ("!ReferenceEquals", !Object.ReferenceEquals (x509a, x));
#if NET_2_0
			AssertEquals ("A-x", 0, c.IndexOf (x));
#else
			AssertEquals ("A-x", -1, c.IndexOf (x));
#endif
		}