System.CodeDom.CodeCatchClauseCollection.IndexOf C# (CSharp) Method

IndexOf() public method

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

Usage Example

		public void Constructor1 ()
		{
			CodeCatchClause cc1 = new CodeCatchClause ();
			CodeCatchClause cc2 = new CodeCatchClause ();

			CodeCatchClause[] catchClauses = new CodeCatchClause[] { cc1, cc2 };
			CodeCatchClauseCollection coll = new CodeCatchClauseCollection (
				catchClauses);

			Assert.AreEqual (2, coll.Count, "#1");
			Assert.AreEqual (0, coll.IndexOf (cc1), "#2");
			Assert.AreEqual (1, coll.IndexOf (cc2), "#3");
		}
All Usage Examples Of System.CodeDom.CodeCatchClauseCollection::IndexOf