MoreDotNet 2.1.0

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

// Install MoreDotNet as a Cake Tool
#tool nuget:?package=MoreDotNet&version=2.1.0

MoreDotNet

Status

NuGet version

Coverage Status

Summary

This project is a collection of handy extension methods for the .NET Framework. The functionality of this package can be separated in the following groups:

Extension methods for common .NET types:


  • ICollection:
AddRange()
  • IDictionary:
GetOrDefault()
GetKeyIgnoringCase()
  • IEnumerable:
ForEach()
EmptyIfNull()
Shuffle()
ToString()
IsNullOrEmpty()
ToHashSet()
  • IList:
BinarySearch()
ToDataTable()
InsertionSort()
InsertWhere()
RemoveAll()
  • bool:
WhenTrue()
WhenFalse()
  • ByteArray:
GetString()
  • IConvertible:
To()
ToOrDefault()
ToOrOther()
ToOrNull()
  • IDataRecord:
GetNullable()
  • DateTime:
FirstDayOfMonth()
LastDayOfMonth()
NextDate()
Midnight()
Noon()
WithTime()
IsFuture()
IsPast()
IsWorkDay()
IsWeekend()
NextWorkday()
  • Enum:
GetDisplayName()
GetDescription()
  • Generics
IsBetween()
GetMemberName()
  • int:
RangeTo()
  • object:
Is()
IsNot()
As()
ToDictionary()
  • OperatingSystem:
IsWinXpOrHigher()
IsWinVistaOrHigher()
IsWin7OrHigher()
IsWin8OrHigher()
  • Random:
OneOf()
NextBool()
NextChar()
NextDateTime()
NextDouble()
NextString()
NextTimeSpan()
  • Stream:
ToByteArray()
ToStream()
  • string:
ToTitleCase()
CaseToWords()
Capitalize()
IsLike()
ToMaximumLengthString()
NthIndexOf()
RemoveLastCharacter()
RemoveLast()
RemoveFirstCharacter()
RemoveFirst()
  • Type:
IsNullable()
GetCoreType()
  • Xml:
XmlSerialize()
XmlDeserialize()
  • RomanNumeral:
IsValidRomanNumeral()
ParseRomanNumeral()
ToRomanNumeralString()

Static helpers


  • Directory:
CreateTempDirectory()
SafeDeleteDirectory()
  • File:
SaveStringToTempFile()
SaveByteArrayToTempFile()

Wrappers for transforming common static methods to instance methods


Example:

string.IsNullOrWhiteSpace(testStringVar)

Is transformed to:

testStringVar.IsNullOrWhiteSpace()

Installation

NOTE: The package is still under development and some bugs may exist!

You can install the library using NuGet into your project:

Install-Package MoreDotNet

Changelog

Version 0.7

  • Switched to .NET Standard.
  • APIs for Color, OperatingSystem and DataTable removed due to them missing in the .NET Standard API.

License

This package has MIT license. Refer to the LICENSE for detailed information.

Any questions, comments or additions

If you have a feature request or bug report, leave an issue on the issues page or send a pull request. For general questions and comments, use the StackOverflow forum.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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
2.1.0 161 12/29/2023
2.0.4 105 12/16/2023
2.0.3 81 12/16/2023
2.0.2 93 12/16/2023
2.0.1 88 12/16/2023
2.0.0 98 12/16/2023
1.0.0 584 4/8/2020
0.7.2 917 10/2/2017
0.7.1 975 5/13/2017
0.7.0 902 5/13/2017
0.6.0 1,057 10/22/2016
0.5.1 926 10/22/2016
0.5.0 947 9/29/2016
0.4.0 1,095 7/1/2016
0.3.5 1,020 5/9/2016
0.3.4 939 5/9/2016
0.3.3 966 5/9/2016
0.3.2 981 5/9/2016
0.3.1 955 5/9/2016
0.3.0 954 5/8/2016