Skip to content
John Mazouri edited this page Oct 28, 2017 · 1 revision

Welcome to the SharpPad wiki! Here's a few snippets to start you out.

Dumping an Object

using SharpPad;

class Foo
{
    public string Name {get; set;}
    public decimal Money {get; set;}
    public DateTime Date {get; set;}
}

var foo = new Foo
{
    Name = "John",
    Money = 12345.66m,
    Date = DateTime.Now
};

await foo.Dump();
await foo.Dump("My Bank Account"); //with a title

Dumping a Tuple

using SharpPad;

static (string name, decimal money, string more) DummyTuple()
{
    return ("John", 1234.56m, "Asdf");
}

await Output.DumpTuple(DummyTuple);

Setting the output port

using SharpPad;

//Set this before dumping anything
Output.Port = 5555;
Clone this wiki locally