Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 734 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 734 Bytes

AutoDeconstruct

A library that automatically adds support for object deconstruction in C#.

Getting Started

First, reference the AutoDeconstruct NuGet package.

Then, add [AutoDeconstuct] to a type so you can deconstruct it:

using AutoDeconstruct;

[AutoDeconstruct]
public sealed class Person
{
  public uint Age { get; set; }
  public required string Name { get; set; }
}

var person = new Person { Age = 22, Name = "Joe" };
var (age, name) = person;

Read the overview document for further details.

Prerequisites

The Rocks package targets .NET Standard 2.0 for host flexibility.