MarkDev.Utils.CSharpHelpers 1.0.1

.NET 5.0 .NET Core 3.1 .NET Standard 2.0 .NET Framework 4.5
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.
dotnet add package MarkDev.Utils.CSharpHelpers --version 1.0.1
<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, C# scripting and .NET Interactive. 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.Right(int length) - Get substring of specified number of characters on the right.


var longString = "abcdefghijklmnopqrstuvwxyz";

var lastFourXters = longString.Right(4);

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


var longString = "abcdefghijklmnopqrstuvwxyz";

var lastFourXters = longString.Left(4);

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


var name = "MarkAdesina";

var base64 = name.ToBase64();

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


var name = "somebase64string";

var rawString = name.FromBase64();

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


var email = "";

var isValid = email.IsValidEmail();

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


var someVal = "true";

var isBool = someVal.ToBool();

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


var someVal = "";

var val = someVal.EmptyIfNull();

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


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.


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

var decryptedVal = someVal.DecryptFromDES(key);

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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 175 6/16/2021
1.0.0 169 6/10/2021