Default parameter in C# 4

Simple overload:



Now let’s do this with a default property:

public partial class SettingsForm : XtraForm
public bool ShowRestartRequiredMessage { get; set; }

public SettingsForm(bool showRestartRequiredMessage = false)
ShowRestartRequiredMessage = showRestartRequiredMessage;

We don’t need an overload anymore but nothing changed on the usage of the class




Visual Studio is waiting for an internal operation to complete

With the new VS 2013 I encountered problems with the designer in my WinForms projects. Sometimes I got the message and had to wait about 5 minutes to continue working. With Update 1 for VS 2013 the problem seems to be gone, give it a shot.

VS 2013 Update 1