Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Page.IsPostBack or IsPostBack

Tags:

asp.net

I just wanted to know that is there any performance difference between these two statements

Page.IsPostBack

or

IsPostBack
like image 398
santosh singh Avatar asked Nov 01 '25 16:11

santosh singh


2 Answers

There will be a difference at the IL level (an additional getter call in the first case) but it will be so negligible that you shouldn't bother at all.

like image 200
Darin Dimitrov Avatar answered Nov 04 '25 20:11

Darin Dimitrov


There is no practical difference. The Page property merely exposes a reference to the same instance as this.

like image 22
wsanville Avatar answered Nov 04 '25 21:11

wsanville