Description
The Deconstruct
method is a member of the Sandbox.Utility.Svg.AddRoundRectPathCommand
class. It is used to deconstruct an instance of AddRoundRectPathCommand
into its constituent properties: Rect
, Rx
, and Ry
. This method is particularly useful for pattern matching and tuple deconstruction in C#.
Usage
To use the Deconstruct
method, you need to have an instance of AddRoundRectPathCommand
. You can then call the method to extract the Rect
, Rx
, and Ry
properties into separate variables. This is done by passing the variables as out
parameters.
Example
// Example of using the Deconstruct method
AddRoundRectPathCommand command = new AddRoundRectPathCommand();
// Assuming command is initialized with some values
Sandbox.Rect rect;
float rx, ry;
// Deconstruct the command into its components
command.Deconstruct(out rect, out rx, out ry);
// Now rect, rx, and ry hold the respective values from the command