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
- IList (Array, List, etc.) (Up to 15 items)
- Reference Tuple (System.Tuple) (Up to 21 items)
- KeyValuePair
- Drawing Types
- Point / PointF
- Size / SizeF
- Rectangle / RectangleF
- Color
- Windows Forms Types
- Padding
- TableLayoutPanelCellPosition
- WPF Types
- Point
- Size
- Rect
- Thickness
- CornerRadius
- Color
- Numerics Types
- Vector2/3/4
- Matrix3x2/4x4
- Version
- DateTime
- DateTime
- DateOnly
- TimeOnly
- DateTimeOffset
- Span
- Span
- ReadOnlySpan
Changelog
Changelog