Carubbi.Extensions 1.2.1

A simple library extension-method based to solve common tasks

There is a newer version of this package available.
See the version list below for details.
Install-Package Carubbi.Extensions -Version 1.2.1
dotnet add package Carubbi.Extensions --version 1.2.1
<PackageReference Include="Carubbi.Extensions" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Carubbi.Extensions --version 1.2.1
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 237 11/4/2018
1.2.2 216 9/10/2018
1.2.1 174 9/10/2018
1.2.0 166 9/10/2018
1.1.0 403 8/30/2018
1.0.0 412 8/20/2018