通常、Page_Load
イベントハンドラーがVisual Studioによって分離コードファイルに追加されると(たとえば、デザイナーモードでページをダブルクリックすると)、次のようになります。
/// <summary>
/// Handles the Load event of the Page control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
protected void Page_Load(object sender, EventArgs e)
{
// ...
}
しかし、Resharperは提案してName 'Page_Load' does not match rule 'Methods, properties and events'. Suggested name is 'PageLoad'
います。ページ読み込みのハンドラーを定義するより良い方法があると思いますが、構文が何であるかを思い出せませんが、このResharper警告を解決すると思いますか?
おそらく次のようなものです:
/// <summary>
/// Raises the <see cref="E:System.Web.UI.Control.Load"/> event.
/// </summary>
/// <param name="e">The <see cref="T:System.EventArgs"/> object that contains the event data.</param>
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
// ...
}
しかし、私はそれを思い出しているようで、まったく同じではありませんかOnLoad
?PageLoad