public partial class HelloWorldService : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//HttpHelloWorldService.GetInstance().Execute(Request, Response);
//--can the above code be written in the following 3 lines??.......
HttpHelloWorldService.GetInstance();
HttpHelloWorldService hhtt = new HttpHelloWorldService();
hhtt.Execute(Request,Response);
}
}
注: -HttpHelloWorldService
は、次の 2 つのメソッドを持つ静的クラスです。
-public static HttpHelloWorldService GetInstance()
-public void Execute(HttpRequest request, HttpResponse response)