DeconstructionInfo Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The representation of a deconstruction as a tree of Deconstruct methods and conversions. Methods only appear in non-terminal nodes. All terminal nodes have a Conversion.
Here's an example:
A deconstruction like (int x1, (long x2, long x3)) = deconstructable1
with
Deconstructable1.Deconstruct(out int y1, out Deconstructable2 y2)
and
Deconstructable2.Deconstruct(out int z1, out int z2)
is represented as 5 DeconstructionInfo nodes.
The top-level node has a Method (Deconstructable1.Deconstruct), no Conversion, but has two Nested nodes. Its first nested node has no Method, but has a Conversion (Identity). Its second nested node has a Method (Deconstructable2.Deconstruct), no Conversion, and two Nested nodes. Those last two nested nodes have no Method, but each have a Conversion (ImplicitNumeric, from int to long).
public value class DeconstructionInfo
public struct DeconstructionInfo
public readonly struct DeconstructionInfo
type DeconstructionInfo = struct
Public Structure DeconstructionInfo
- Inheritance
-
DeconstructionInfo
Properties
Conversion |
The conversion for a terminal position in the deconstruction tree. |
Method |
The Deconstruct method (if any) for this non-terminal position in the deconstruction tree. |
Nested |
The children for this deconstruction node. |
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기