Share C# classes, LINQ queries, or ASP.NET Core handlers: syntax-highlighted and shareable without a Microsoft account.
1public sealed record CreateOrderCommand(2 Guid CustomerId,3 IReadOnlyList<OrderLineDto> Lines4);56public sealed class CreateOrderHandler(7 IOrderRepository orders,8 IUnitOfWork uow9) : IRequestHandler<CreateOrderCommand, Guid>10{11 public async Task<Guid> Handle(12 CreateOrderCommand cmd,13 CancellationToken ct)14 {15 var order = Order.Create(cmd.CustomerId, cmd.Lines16 .Select(l => new OrderLine(l.ProductId, l.Qty, l.UnitPrice)));1718 await orders.AddAsync(order, ct);19 await uow.CommitAsync(ct);20 return order.Id;21 }22}Paste C# code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.
Deleted on first open. Can't be viewed twice.
Add a password for end-to-end encryption with no raw key stored.
Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.
No sign-up, no email, no ads. Paste and share in seconds.
Yes. The grammar supports C# 12 including primary constructors, collection expressions, and inline arrays.
For Razor templates, paste as HTML: it will highlight the HTML structure reasonably well.
Pastes up to 5 MB are supported.