Skip to main content
added 17 characters in body
Source Link

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax (less so) examples, while cool, are difficult to read for the uninitiated.

Who knows, maybe Microsoft will add a 'between' keyword in future versions of C# to make ranges easier to read -- that I'd like to see!

Until such time, the C#7 and updated C#9 examples below for ranges work and look best for readability.

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax examples, while cool, are difficult to read for the uninitiated.

Who knows, maybe Microsoft will add a 'between' keyword in future versions of C# to make ranges easier to read -- that I'd like to see!

Until such time, the C#7 and updated C#9 examples below for ranges work and look best for readability.

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax (less so) examples, while cool, are difficult to read for the uninitiated.

Who knows, maybe Microsoft will add a 'between' keyword in future versions of C# to make ranges easier to read -- that I'd like to see!

Until such time, the C#7 and updated C#9 examples below for ranges work and look best for readability.

added 17 characters in body
Source Link

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax examples, while cool, are difficult to read for the uninitiated.

Who knows, maybe Microsoft will add a 'between' keyword in future versions of C# to make ranges easier to read -- that I'd like to see!

Until such time, the C#7 exampleand updated C#9 examples below for ranges workswork and lookslook best for readability.

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax examples, while cool, are difficult to read for the uninitiated.

Who knows, maybe Microsoft will add a 'between' keyword in future versions of C# to make ranges easier to read -- that I'd like to see!

Until such time, the C#7 example below for ranges works and looks best for readability.

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax examples, while cool, are difficult to read for the uninitiated.

Who knows, maybe Microsoft will add a 'between' keyword in future versions of C# to make ranges easier to read -- that I'd like to see!

Until such time, the C#7 and updated C#9 examples below for ranges work and look best for readability.

added 139 characters in body
Source Link

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax examples, while cool, are difficult to read for the uninitiated.

Who knows, maybe Microsoft will add a 'between' keyword in future versions of C# to make ranges easier to read -- that I'd like to see!

Until such time, the C#7 example below for ranges works and looks best for readability.

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax examples, while cool, are difficult to read for the uninitiated.

The C#9 example is preferable as it is easiest to read for most developers regardless of their background.

If you are capitated to using an earlier framework that doesn't allow for this syntax then use the format that got over 800 votes.

The prime number example while good academically speaking is an unrealistic business case, I seriously doubt that the over 800 respondents have had a need to find prime number ranges (yes I know it's just an example) and switch between them for their day to day programming.

Lambda expressions and LINQ syntax examples, while cool, are difficult to read for the uninitiated.

Who knows, maybe Microsoft will add a 'between' keyword in future versions of C# to make ranges easier to read -- that I'd like to see!

Until such time, the C#7 example below for ranges works and looks best for readability.

Source Link
Loading