Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local variable
Message
De
10/01/2009 10:17:12
 
 
À
10/01/2009 08:12:06
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01372518
Message ID:
01372534
Vues:
15
>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

In addition to Cetin's response, look at Ref parameter and Out parameter here:

http://dotnetperls.com/Content/Cheat-Sheet.aspx

Also, for general string handling, here is a link with some great string handling advice and examples:

http://www.codeproject.com/KB/books/0735616485.aspx
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform