GetListByListId
İçindekiler
[
Saklamak
]ListCollection.GetListByListId method
Bir liste tanımlayıcısına göre bir liste alır.
public List GetListByListId(int listId)
| Parametre | Tip | Tanım |
|---|---|---|
| listId | Int32 | Liste tanımlayıcısı. |
Geri dönüş değeri
Liste nesnesini döndürür.hükümsüz Belirtilen tanımlayıcıya sahip bir liste bulunamadıysa.
Notlar
Normalde bu yöntemi kullanmanız gerekmez. Çoğu zaman paragraflara sadece şu ayarları yaparak list formatting uygularsınız:List property öğesininListFormat nesne.
Örnekler
Listelerin sahip belge özelliklerinin nasıl doğrulanacağını gösterir.
Document doc = new Document();
ListCollection lists = doc.Lists;
Assert.AreEqual(doc, lists.Document);
List list = lists.Add(ListTemplate.BulletDefault);
Assert.AreEqual(doc, list.Document);
Console.WriteLine("Current list count: " + 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)));
Ayrıca bakınız
- class List
- class ListCollection
- ad alanı Aspose.Words.Lists
- toplantı Aspose.Words