Cook pastry to specifications in hot oven; once cooked remove from oven to cool and place a tray on top to get rid of the air and make it flat.
Combine sugar, custard powder, and corn flour in a heavy-based saucepan. Mix in a little of the milk to form a smooth paste (get rid of any lumps). Add the butter and remainder of the milk and bring to the boil on top of the stove stirring constantly. The custard will start to coagulate-this is normal, reduce the heat and cook for 3 minutes or until you have a thick custard, take off the heat and add the beaten egg yolks and the vanilla essence and stir through.
Place cooked custard onto one slice of the pastry (should be around an inch thick) and then sandwich it with the second piece of pastry. Cool in the fridge.
Ice with your favourite icing! (Nan's version has 1 cup of icing mixture, 1tsp of butter, the pulp of one passion fruit (or part of a tin) and hot water to make a thick icing mix). Allow the slice to set in the fridge and cut to size.