System.CodeDom.Compiler.CompilerErrorCollection.IndexOf C# (CSharp) Method

IndexOf() public method

public IndexOf ( CompilerError value ) : int
value CompilerError
return int
        public int IndexOf(CompilerError value) {
            return List.IndexOf(value);
        }
        

Usage Example

		public void Constructor0_Deny_Unrestricted ()
		{
			CompilerErrorCollection coll = new CompilerErrorCollection ();
			Assert.AreEqual (0, coll.Add (ce), "Add");
			Assert.AreSame (ce, coll[0], "this[int]");
			coll[0] = ce;
			coll.CopyTo (array, 0);
			coll.AddRange (array);
			coll.AddRange (coll);
			Assert.IsTrue (coll.Contains (ce), "Contains");
			Assert.AreEqual (0, coll.IndexOf (ce), "IndexOf");
			coll.Insert (0, ce);
			coll.Remove (ce);
			ce.IsWarning = false;
			Assert.IsTrue (coll.HasErrors, "HasErrors");
			Assert.IsFalse (coll.HasWarnings, "HasWarnings");
		}