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

Insert() public method

public Insert ( int index, CompilerError value ) : void
index int
value CompilerError
return void
        public void Insert(int index, CompilerError value) {
            List.Insert(index, 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");
		}