Skip to content

Make the "out" modifier when calling a method optional if the result is being discarded #2778

Discussion options

You must be logged in to vote
public static bool IsBoolean(string s)
{
	return bool.TryParse(s);
}

This would make it a breaking change then for bool to add a TryParse function that didn't have an out param in the future.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by YairHalberstadt
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
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #2778 on November 04, 2020 13:16.