Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to re-factor
Message
From
14/02/2013 14:00:37
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01565967
Message ID:
01566054
Views:
54
If you read http://search.barnesandnoble.com/Framework-Design-Guidelines/Krzysztof-Cwalina/e/9780321545619, it tells you that in the .Net Framework, they used out and ref parameters in some cases, but now think it was a mistake. So, if they were to start over today, TryParse would probably work differently.

>I agree with you up to here, but why does TryParse need to return success of failure? I rather have it returning null if it fails and then no need of an output parameter (or an object with 2 properties), I just need to remember that my variable should be nullable.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform