HasSameTemplate

List.HasSameTemplate method

Returns true if the current list and the given list are created from the same template.

public bool HasSameTemplate(List other)

Examples

Shows how to define lists with the same ListDefId.

Document doc = new Document(MyDir + "Different lists.docx");

Assert.True(doc.Lists[0].HasSameTemplate(doc.Lists[1]));
Assert.False(doc.Lists[1].HasSameTemplate(doc.Lists[2]));

See Also