GetListByListId
محتويات
[
يخفي
]ListCollection.GetListByListId method
يحصل على قائمة من خلال معرف القائمة.
public List GetListByListId(int listId)
معامل | يكتب | وصف |
---|---|---|
listId | Int32 | معرف القائمة. |
قيمة الإرجاع
إرجاع كائن القائمة. إرجاعباطل
إذا لم يتم العثور على قائمة بالمعرف المحدد.
ملاحظات
لا تحتاج عادةً إلى استخدام هذه الطريقة. في أغلب الأحيان، تُطبّق list formatting على الفقرات بمجرد ضبطList
property منListFormat
هدف.
أمثلة
يوضح كيفية التحقق من خصائص مستند المالك للقوائم.
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)));
أنظر أيضا
- class List
- class ListCollection
- مساحة الاسم Aspose.Words.Lists
- المجسم Aspose.Words