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

IndexOf() public method

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

Usage Example

		public void Constructor1 () 
		{
			CodeTypeReference ref1 = new CodeTypeReference (string.Empty);
			CodeTypeReference ref2 = new CodeTypeReference (string.Empty);

			CodeTypeReference[] refs = new CodeTypeReference[] { ref1, ref2 };
			CodeTypeReferenceCollection coll = new CodeTypeReferenceCollection (
				refs);

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