Is it possible to set default values for PageSize in C #? For instance:
public virtual void Render(string reportTitle, Rectangle pageSize = PageSize.A4) { foreach (Page p in pages) { p.Render(document); document.NewPage(); document.AddCreationDate(); document.AddTitle(reportTitle); document.SetPageSize(pageSize); } }
I have the following error in Visual Studio 2010:
The default parameter value for 'pageSize' should be a constant compilation time.
source share