FluentExtensions.NET 1.0.0

.NET Standard 2.0
There is a newer version of this package available.
See the version list below for details.
dotnet add package FluentExtensions.NET --version 1.0.0
NuGet\Install-Package FluentExtensions.NET -Version 1.0.0
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="FluentExtensions.NET" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentExtensions.NET --version 1.0.0
#r "nuget: FluentExtensions.NET, 1.0.0"
#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 FluentExtensions.NET as a Cake Addin
#addin nuget:?package=FluentExtensions.NET&version=1.0.0

// Install FluentExtensions.NET as a Cake Tool
#tool nuget:?package=FluentExtensions.NET&version=1.0.0

<p align="center"> <a href="https://github.com/D-Diyare/FluentExtensions"> <img alt="FluentExtensions" width="600" heigth="100" src="https://github.com/D-Diyare/FluentExtensions/blob/master/docs/FluentExtensionsLogo.png"> </a> </p > <br/>

FluentExtensions

Fluent Extensions is a set of more than 70 .NET extensions, it especially made for helping developers to focus on the main tasks rather than get distracted by writing the same code again and again.

Install FluentExtensions via NuGet

If you want to include FluentExtensions in your project, you can install it directly from NuGet

To install FluentExtensions, run the following command in the Package Manager Console

PM> Install-Package FluentExtensions

Extensions

Extensions to Numbers
bool IsEven(this int source);
bool IsOdd(this int source);
bool IsGreaterThan(this int source, int target);
bool IsLessThan(this int source, int target);
bool IsEqualTo(this int source, int target);
DateTime DaysAgo(this int days);
DateTime DaysAfter(this int days);
DateTime WeeksAgo(this int weeks);
DateTime WeeksAfter(this int weeks);
DateTime Days(this int num);
DateTime MonthsAfter(this int months);
DateTime MonthsAgo(this int months);
DateTime YearsAgo(this int years);
DateTime YearsAfter(this int years);
bool IsLeapYear(this int year);
int NextLeapYear(this int year);
int PreviousLeapYear(this int year);
string FromByeArrayToBase64(this byte[] source, Base64FormattingOptions options = Base64FormattingOptions.None);
string SeparateThousandsByComma(this int source);
string SeparateThousandsByComma(this int source, CultureInfo culture);
string RandomDigits(this int length);
string GenerateRandomString(this int length, bool isUpperCase = false, bool containNumbers = false);
Extensions to Strings
bool IsInt(this string source);
bool IsDouble(this string source);
bool IsDecimal(this string source);
IsBoolean(this string source);
bool IsDate(this string source);
string GetInBetween(this string source, string start, string end);
string ToTitleCase(this string source);
string ToTitleCase(this string source, CultureInfo culture);
bool ToBoolean(this string source);
bool IsContainDigits(this string source);
bool IsContainLetters(this string source);
bool AreAllDigits(this string source);
bool AreAllLetters(this string source);
byte[] FromBase64ToByteArray(this string source);
byte[] GetBytes(this string source);
byte[] GetBytes(this string source, EncodingType encodingType);
bool IsEmpty(this string source);
string GetFileExtension(this string filePath);
bool FileExists(this string filePath);
ToFileInDisk(this string source, string path);
Task ToFileInDiskAsync(this string source, string path);
string ReadFromDisk(this string path);
Task<string> ReadFromDiskAsync(this string path);
Extensions to DateTime
DateTime Tomorrow(this DateTime current);
DateTime Yesterday(this DateTime current);
DateTime NextHour(this DateTime current);
DateTime LastHour(this DateTime current);
DateTime NextWeek(this DateTime current);
DateTime LastWeek(this DateTime current);
static DateTime LastMonth(this DateTime current);
DateTime NextMonth(this DateTime current);
DateTime LastYear(this DateTime current);
DateTime NextYear(this DateTime current);
DateTime DaysAgo(this DateTime source, int days);
DateTime DaysAfter(this DateTime source, int days);
DateTime WeeksAgo(this DateTime source, int weeks);
DateTime WeeksAfter(this DateTime source, int weeks);
DateTime MonthsAgo(this DateTime source, int months);
DateTime MonthsAfter(this DateTime source, int months);
DateTime YearsAgo(this DateTime source, int years);
static DateTime YearsAfter(this DateTime source, int years);
DateTime FirstDayOfMonth(this DateTime date);
DateTime LastDayOfMonth(this DateTime date);
double DaysLeft(this DateTime source, DateTime target);
int DaysInMonth(this DateTime date);
bool IsBetween(this DateTime dateToCompare,
            DateTime startDate, DateTime endDate);
bool IsBefore(this DateTime dateToCompare, DateTime target);
bool IsAfter(this DateTime dateToCompare, DateTime target);
bool IsYearLeap(this DateTime date);
DateTime NextLeapYear(this DateTime date);
DateTime PreviousLeapYear(this DateTime date);
int GetAge(this DateTime date);
string DayName(this DateTime current);
Extensions to Lists
IEnumerable<T> ToImmutableList<T>(this IEnumerable<T> sourceList);
static IEnumerable<T> ReplaceWith<T>(this IList<T> sourceList, IEnumerable<T> targetList);
T PickRandomItem<T>(this IList<T> sourceList);
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 net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework 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.
  • .NETStandard 2.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.6.0 182 3/8/2022
1.5.0 168 2/6/2022
1.4.0 183 1/17/2022
1.3.0 246 9/4/2021
1.2.0 175 9/3/2021
1.1.0 172 9/2/2021
1.0.0 203 9/1/2021

Initial Release