Idea #2 for C# syntactic sugar - pipe-like notation
I think this has already been implemented to some extent in F# with the |> operator but I'd love to see it in C# with existing methods, without a need to rewrite them all. I often see code like this:

    var str = string.Join("|", Regex.Split(File.ReadAllText(@"C:\file.txt"),
              @"EOL(\r\n?|\n)", RegexOptions.IgnoreCase).Where(s => s != ""));

what does str contain? You'd have to look carefully at the parenthesis and see that it first reads the text file, then the regex splits it, then empty lines are removed, then they are joined together. They order in which they are written often is counter to the order of execution. A more natural to write this would be:

    var str = File.ReadAllText(@"C:\file.txt")
              |> Regex.Split(@"EOL(\r\n?|\n)", RegexOptions.IgnoreCase)
              |> Where(s => s != "")
              |> string.Join("|")

The |> operator would pass the previous result either as the `this` (for Where()) or as the first parameter with a compatible type (for Regex.Split() it's the first parameter, for string.Join() it's the second parameter) for the next code section. We could further simplify the code by applying another syntactic sugar as suggested here: http://stackoverflow.com/questions/5256892/an-idea-for-an-implicit-context-dependent-operator-dot-as-syntactic-sugar

    var str = File.ReadAllText(@"C:\file.txt")
              |> Regex.Split(@"EOL(\r\n?|\n)", .IgnoreCase)
              |> Where(. != "")
              |> string.Join("|")

This seems to me easier to read than the first code, and the order is the real order in which the operations are done so it's more logical. No methods would not need to be rewritten and this would work with all current code, only the |> operator added.

I'll just go on a limb here and add one more thing - since we're no longer nesting methods like in the first code, we could make parenthesis optional entirely, making the code a bit more readable:

    var str = File.ReadAllText @"C:\file.txt"
              |> Regex.Split @"EOL(\r\n?|\n)", .IgnoreCase
              |> Where . != ""
              |> string.Join "|"
Idea #2 for C# syntactic sugar - pipe-like notation
===

I think this has already been implemented to some extent in F# with the |> operator but I'd love to see it in C# with existing methods, without a need to rewrite them all. I often see code like this:

    var str = string.Join("|", Regex.Split(File.ReadAllText(@"C:\file.txt"),
              @"EOL(\r\n?|\n)", RegexOptions.IgnoreCase).Where(s => s != ""));

what does str contain? You'd have to look carefully at the parenthesis and see that it first reads the text file, then the regex splits it, then empty lines are removed, then they are joined together. They order in which they are written often is counter to the order of execution. A more natural to write this would be:

    var str = File.ReadAllText(@"C:\file.txt")
              |> Regex.Split(@"EOL(\r\n?|\n)", RegexOptions.IgnoreCase)
              |> Where(s => s != "")
              |> string.Join("|")

The |> operator would pass the previous result either as the `this` (for Where()) or as the first parameter with a compatible type (for Regex.Split() it's the first parameter, for string.Join() it's the second parameter) for the next code section. We could further simplify the code by applying another syntactic sugar as suggested here: http://stackoverflow.com/questions/5256892/an-idea-for-an-implicit-context-dependent-operator-dot-as-syntactic-sugar

    var str = File.ReadAllText(@"C:\file.txt")
              |> Regex.Split(@"EOL(\r\n?|\n)", .IgnoreCase)
              |> Where(. != "")
              |> string.Join("|")

This seems to me easier to read than the first code, and the order is the real order in which the operations are done so it's more logical. No methods would not need to be rewritten and this would work with all current code, only the |> operator added.

I'll just go on a limb here and add one more thing - since we're no longer nesting methods like in the first code, we could make parenthesis optional entirely, making the code a bit more readable:

    var str = File.ReadAllText @"C:\file.txt"
              |> Regex.Split @"EOL(\r\n?|\n)", .IgnoreCase
              |> Where . != ""
              |> string.Join "|"