diff b/w method variable and local variable

Posted by Sheeba under ASP.NET on 4/1/2011 | Points: 10 | Views : 1215 | Status : [Member] | Replies : 2
Hi

diff b/w method variable and local variable in asp.net


Thanks




Responses

Posted by: SheoNarayan on: 4/1/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Not sure in what context you have named it method variable and local variable. Based on my guess

Method variable - is a variable that has been defined inside a method and its scope is limited to within that method only.

Local variable - is a variable that has been defined within the scope of the page and that can be used through out the page within any methods.

Hope this helps.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Sheeba, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 4/3/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Exactly what sheo mentioned... But you need to post your question like Local Variable and Global Variable.... Local variable will be specific to the block which it is specified(Normally a method). GLobal variable will be specific to the block(PAGE).

Thanks
Karthik
www.f5Debug.net

Sheeba, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response