Table of Contents

Method DeepClone

Namespace
Terminal.Gui.Configuration
Assembly
Terminal.Gui.dll

DeepClone<T>(T?)

Creates a deep copy of the specified object.

[RequiresUnreferencedCode("Deep cloning may use reflection which might be incompatible with AOT compilation if types aren't registered in SourceGenerationContext")]
[RequiresDynamicCode("Deep cloning may use reflection that requires runtime code generation if source generation fails")]
public static T? DeepClone<T>(T? source)

Parameters

source T

The object to clone.

Returns

T

A deep copy of the source object, or default if source is null.

Type Parameters

T

The type of the object to clone.