Skip to content

Settings and activity

6 results found

  1. 50 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Are you aware that you can call .Dump() on an expression? The output is not exactly the same as the Expression Tree Visualizer, but it conveys much of the same information. Is there anything missing from what you see that you’d like added? Or anything that you’d like changed?

    An error occurred while saving the comment
    Nelson Ferrari commented  · 

    Isn't this what the "Tree" result option (Results Lambda SQL IL+Native Tree) does?

  2. 1,272 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Nelson Ferrari supported this idea  · 
  3. 12 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Nelson Ferrari commented  · 

    I would use it to process log files and similar. Copy multiple lines and paste on LINQPad's input.

    Nelson Ferrari supported this idea  · 
  4. 18 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Nelson Ferrari supported this idea  · 
  5. 8 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Nelson Ferrari commented  · 

    I saw a HexDump extension somewhere (probably in the forums). Since I cannot remember the place, here is his suggestion (just copy it to "MyExtensions"):

    [code]
    void Main()
    {
    // Write code to test your extensions here. Press F5 to compile and run.
    byte[] text = Encoding.UTF8.GetBytes("The quick brown fox jumps over the lazy dog");
    var textList = new List<byte>(text);

    //HexDump(text);
    text.HexDump();
    textList.HexDump();
    }

    public static class MyExtensions
    {
    // Write custom extension methods here. They will be available to all queries.
    public static object HexDump(this byte[] data)
    {
    return data
    .Select((b, i) => new { Byte = b, Index = i })
    .GroupBy(o => o.Index / 16)
    .Select(g =>
    g
    .Aggregate(
    new { Hex = new StringBuilder(), Chars = new StringBuilder() },
    (a, o) => {a.Hex.AppendFormat("{0:X2} ", o.Byte); a.Chars.Append(Convert.ToChar(o.Byte)); return a;},
    a => new { Hex = a.Hex.ToString(), Chars = a.Chars.ToString() }
    )
    )
    .ToList()
    .Dump();
    }

    public static object HexDump(this List<byte> data)
    {
    return data.ToArray().HexDump();
    }
    }
    [/code]

  6. 7 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Nelson Ferrari shared this idea  ·