ListCollectionDocument Property |
Namespace: Aspose.Words.Lists
Document doc = new Document(); ListCollection lists = doc.Lists; // All of these should be equal Console.WriteLine("ListCollection document is doc: " + (doc == lists.Document)); Console.WriteLine("Starting list count: " + lists.Count); List list = lists.Add(ListTemplate.BulletDefault); Console.WriteLine("List document is doc: " + (list.Document == doc)); Console.WriteLine("List count after adding list: " + lists.Count); Console.WriteLine("Is the first document list: " + (lists[0].Equals(list))); Console.WriteLine("ListId: " + list.ListId); Console.WriteLine("List is the same by ListId: " + (lists.GetListByListId(1).Equals(list)));