public void VerifyAccess()
{
if (Thread.CurrentThread != owner)
throw new InvalidOperationException("TextDocument can be accessed only from the thread that owns it.");
}
DocumentLine IList <DocumentLine> .this[int index] { get { document.VerifyAccess(); return(GetByNumber(1 + index)); } set { throw new NotSupportedException(); } }