EPiServer get all page types

To get all page types in EPiServer, use the following code:

var pageTypes = EPiServer.DataAbstraction.PageType.List();