Skip to content

Commit

Permalink
WinForms - Remove obsolete from Paramater less constructor
Browse files Browse the repository at this point in the history
- Causes a warning in the build log when used via the designer
- Instead update the comment and set EditorBrowsableState.Never
  • Loading branch information
amaitland committed Mar 17, 2022
1 parent 19b3480 commit 33f0881
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CefSharp.WinForms/ChromiumWebBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,13 @@ private static void OnApplicationExit(object sender, EventArgs e)
}

/// <summary>
/// <strong>Important!!!</strong>
/// This constructor exists as the WinForms designer requires a parameterless constructor, if you are instantiating
/// an instance of this class in code then use the <see cref="ChromiumWebBrowser(string, IRequestContext)"/>
/// constructor overload instead. Using this constructor in code is unsupported and you may experience <see cref="NullReferenceException"/>'s
/// when attempting to access some of the properties immediately after instantiation.
/// </summary>
[Obsolete("Should only be used by the WinForms Designer. Use the ChromiumWebBrowser(string, IRequestContext) constructor overload instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public ChromiumWebBrowser()
{

Expand Down

0 comments on commit 33f0881

Please sign in to comment.