Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local variable
Message
From
10/01/2009 08:12:06
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Local variable
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01372518
Message ID:
01372518
Views:
74
Hi,
Does C# support same name in sub method?
For example, I have declare string abc in ClassA.MethodA(), I also have declared same variable in ClassA.MethodB(). ClassA.MethodA() will call ClassA.Method().

I faced problem that, whenever I have this, program will behave weird, is either take wrong value, or just jump back to calling program without completely execute all necessary code.

Any ideas?

Please advice. Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Next
Reply
Map
View

Click here to load this message in the networking platform