Skip to content

Avoid the danger of exception And .NET naming conventions #884

Closed Answered by VladislavAntonyuk
theyasub asked this question in Q&A
Discussion options

You must be logged in to vote
  1. This method does exactly what is described. Converts Brush to Color. How do you propose to extend it?
  2. TryConvertToColor should have a different signature. You can compare int.Parse with int.TryParse for example.
  3. This method will not throw null if null is passed as a parameter, because if statement returns false in that case.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@theyasub
Comment options

Answer selected by VladislavAntonyuk
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants