Named String Format Extension NuGet Package

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.




Got any Named String Format Extension Question?





Info

Version: 1.0.0.1
Author(s): NIKER
Last Update: Friday, October 24, 2014
.NET Fiddle: Create the first Fiddle
NuGet Url: https://www.nuget.org/packages/NamedFormatExtension


Install
Install-Package NamedFormatExtension
dotnet add package NamedFormatExtension
paket add NamedFormatExtension
NamedFormatExtension Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

avg-downloads-per-day

0

days-since-last-release

3681