asp.net - what is the best way to declare string or any other data type in c# -
which best memory efficient/efficient way declare string , other data type variables in c#!?
option 1
string strassociateid = context.request.querystring["xxxxxx"], strassociatename = context.request.querystring["xxxxx"], strphoto = context.request.querystring["xxxxx"], strdescription = context.request.querystring["xxxxx"]; or
option 2
string strassociateid = context.request.querystring["xxxxx"]; string strassociatename = context.request.querystring["xxxxx"]; string strphoto = context.request.querystring["xxxxx"]; string strdescription = context.request.querystring["xxxxx"]; or other way!?
which best way follow on longer run?! or both have same efficiency!?
downvoters pls comment can correct.
i trying find best way , question not there in stackoverflow before!!
this not lead discussion, , question answerable , clear
the difference between options, readability. there no performance difference, , generate exact same il.
for readability, choose option 2.
Comments
Post a Comment