Carubbi.Extensions 1.2.3

A simple library extension-method based to solve common tasks

Install-Package Carubbi.Extensions -Version 1.2.3
dotnet add package Carubbi.Extensions --version 1.2.3
<PackageReference Include="Carubbi.Extensions" Version="1.2.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Carubbi.Extensions --version 1.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Carubbi.Extensions

A simple library extension-method based to common tasks

  • Datatype conversions:

Rather than

int? intVariable;
try
{
    intVariable = Convert.ToInt32(str);
}
catch(Exception ex)
{
    intVariable = defaultValue;
}

or

  if (!int.TryParse(str, out int intValue))
  {
      intValue = defaultValue;
  }

You just use

int? intVariable = str.To<int>(defaultValue);

Carubbi.Extensions

A simple library extension-method based to common tasks

  • Datatype conversions:

Rather than

int? intVariable;
try
{
    intVariable = Convert.ToInt32(str);
}
catch(Exception ex)
{
    intVariable = defaultValue;
}

or

  if (!int.TryParse(str, out int intValue))
  {
      intValue = defaultValue;
  }

You just use

int? intVariable = str.To<int>(defaultValue);

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.2.3 192 11/4/2018
1.2.2 182 9/10/2018
1.2.1 152 9/10/2018
1.2.0 144 9/10/2018
1.1.0 335 8/30/2018
1.0.0 353 8/20/2018