MarkDev.Utils.CSharpHelpers 1.0.1

dotnet add package MarkDev.Utils.CSharpHelpers --version 1.0.1
NuGet\Install-Package MarkDev.Utils.CSharpHelpers -Version 1.0.1
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="MarkDev.Utils.CSharpHelpers" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MarkDev.Utils.CSharpHelpers --version 1.0.1
#r "nuget: MarkDev.Utils.CSharpHelpers, 1.0.1"
#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.
// Install MarkDev.Utils.CSharpHelpers as a Cake Addin
#addin nuget:?package=MarkDev.Utils.CSharpHelpers&version=1.0.1

// Install MarkDev.Utils.CSharpHelpers as a Cake Tool
#tool nuget:?package=MarkDev.Utils.CSharpHelpers&version=1.0.1

C-Sharp Helpers

This package comprises of collections of C# helper methods that are used every day by c-sharp developers. You don't have to write these helper functions yourself. There are currenlty eleven helper methods - still growing.

Helpers

Helpers.Right(int length) - Get substring of specified number of characters on the right.

Usage

var longString = "abcdefghijklmnopqrstuvwxyz";

var lastFourXters = longString.Right(4);

Helpers.Left(int length) - Get substring of specified number of characters on the left.

Usage

var longString = "abcdefghijklmnopqrstuvwxyz";

var lastFourXters = longString.Left(4);

Helpers.ToBase64() - Convert a given value to base64 string.

Usage

var name = "MarkAdesina";

var base64 = name.ToBase64();

Helpers.FromBase64() - Convert baase64 string to normal string.

Usage

var name = "somebase64string";

var rawString = name.FromBase64();

Helpers.IsValidEmail() - Verifies that a string is in valid e-mail format.

Usage

var email = "name@somedomain.com";

var isValid = email.IsValidEmail();

Helpers.ToBool() - Converts string to its boolean equivalent.

Usage

var someVal = "true";

var isBool = someVal.ToBool();

Helpers.EmptyIfNull() - Returns an empty string if null or empty is passed.

Usage

var someVal = "";

var val = someVal.EmptyIfNull();

Helpers.EncryptToDES(string key) - Encrypt value with DES Algorithm.

Usage

var someVal = "Some plain text to be encrypted";
var key ="mysecretKey";

var encryptedVal = someVal.EncryptToDES(key);

Helpers.DecryptFromDES(string key) - decrypt value with DES Algorithm.

Usage

var someVal = "Some encrypted value";
var key ="mysecretKey";

var decryptedVal = someVal.DecryptFromDES(key);

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.5.1

    • No dependencies.
  • .NETFramework 4.5.2

    • No dependencies.
  • .NETFramework 4.6

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net5.0

    • 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.1 322 6/16/2021
1.0.0 301 6/10/2021