NamedFormatExtension 1.0.0.1
dotnet add package NamedFormatExtension --version 1.0.0.1
NuGet\Install-Package NamedFormatExtension -Version 1.0.0.1
<PackageReference Include="NamedFormatExtension" Version="1.0.0.1" />
paket add NamedFormatExtension --version 1.0.0.1
#r "nuget: NamedFormatExtension, 1.0.0.1"
// Install NamedFormatExtension as a Cake Addin #addin nuget:?package=NamedFormatExtension&version=1.0.0.1 // Install NamedFormatExtension as a Cake Tool #tool nuget:?package=NamedFormatExtension&version=1.0.0.1
Provides better code maintainability by simple yet powerful .Params() string extension to supplement/replace string.Format(). Accepts numeric, named and reference parameters. More details and examples in XML tooltips.
NUMERIC EXAMPLE:
return "test={0}".Params("value");
returns ["test=value"]
NAMED EXAMPLE:
return "test={val}".Params(val => 1)
returns ["test=1"]
REFERENCE EXAMPLE:
var test = "value";
return "test={test}".Params(() => test)
returns ["test=value"]
WARNING:
You can't combine the 3 types in a single Param() call (there are safety checks in place), but you can chain them. All 3 methods support multiple parameters.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
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.
Version | Downloads | Last updated |
---|---|---|
1.0.0.1 | 2,718 | 10/24/2014 |
Included XML comments.