Bluehill.Deconstructors

GitHub Quality Gate Status Coverage GitHub Workflow Status GitHub issues GitHub pull requests Nuget Nuget (with prereleases) Nuget

A collection of extension methods for deconstruction syntax in C#.

int[] ints = { 1, 2, 3, 4, 5 };
var (one, two, three, four, five) = ints;

How to use

Import Bluehill.Deconstructors namespace.

using Bluehill.Deconstructors;

Supported types

  1. IList (Array, List, etc.) (Up to 15 items)
  2. Reference Tuple (System.Tuple) (Up to 21 items)
  3. KeyValuePair
  4. Drawing Types
    1. Point / PointF
    2. Size / SizeF
    3. Rectangle / RectangleF
    4. Color
  5. Windows Forms Types
    1. Padding
    2. TableLayoutPanelCellPosition
  6. WPF Types
    1. Point
    2. Size
    3. Rect
    4. Thickness
    5. CornerRadius
    6. Color
  7. Numerics Types
    1. Vector2/3/4
    2. Matrix3x2/4x4
  8. Version
  9. DateTime
    1. DateTime
    2. DateOnly
    3. TimeOnly
    4. DateTimeOffset
  10. Span
    1. Span
    2. ReadOnlySpan

Changelog

Changelog