CopyConstructorGenerator 1.3.0
dotnet add package CopyConstructorGenerator --version 1.3.0
NuGet\Install-Package CopyConstructorGenerator -Version 1.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CopyConstructorGenerator" Version="1.3.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CopyConstructorGenerator" Version="1.3.0" />
<PackageReference Include="CopyConstructorGenerator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CopyConstructorGenerator --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CopyConstructorGenerator, 1.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CopyConstructorGenerator@1.3.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CopyConstructorGenerator&version=1.3.0
#tool nuget:?package=CopyConstructorGenerator&version=1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CopyConstructorGenerator
Visual Studio 2022 / 2026 Extension
コピーコンストラクタを作成します。
class, List, Dictionary に対応しています。
class Class1 {
/// <summary>
/// コピーコンストラクター
/// </summary>
public Class1 ( Class1 value ) {
this.Number = value.Number;
this.String = value.String;
this.DateTime = value.DateTime;
this.DayOfWeek = value.DayOfWeek;
this.Class = new Class1( value.Class );
this.List = value.List.ToList();
this.List2 = value.List2.Select( x => new Class1( x ) ).ToList();
this.MultiList = value.MultiList.Select( x => x.ToList() ).ToList();
this.Dictionary = value.Dictionary.ToDictionary( k => k.Key, v => v.Value );
this.f_String = value.f_String;
this.f_Number = value.f_Number;
this.f_DateTime = value.f_DateTime;
}
public int Number { get; set; }
public string String { get; set; }
public DateTime DateTime { get; set; }
public DayOfWeek DayOfWeek { get; set; }
public Class1 Class { get; set; }
public List<string> List { get; set; }
public List<Class1> List2 { get; set; }
public List<List<string>> MultiList { get; set; }
public Dictionary<string, int> Dictionary { get; set; }
public string f_String = "FieldString";
public int f_Number = 0;
public DateTime f_DateTime;
}
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.