BB84.Extensions 4.3.319

dotnet add package BB84.Extensions --version 4.3.319
                    
NuGet\Install-Package BB84.Extensions -Version 4.3.319
                    
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="BB84.Extensions" Version="4.3.319" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BB84.Extensions" Version="4.3.319" />
                    
Directory.Packages.props
<PackageReference Include="BB84.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BB84.Extensions --version 4.3.319
                    
#r "nuget: BB84.Extensions, 4.3.319"
                    
#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.
#:package BB84.Extensions@4.3.319
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BB84.Extensions&version=4.3.319
                    
Install as a Cake Addin
#tool nuget:?package=BB84.Extensions&version=4.3.319
                    
Install as a Cake Tool

net20 net21 net472 net481 net80 net100 NuGet

BB84.Extensions

The core extension methods library providing utilities for common .NET types.

Usage

Depending on the application, there are several ways to skin a cat.

Start of week

The StartOfWeek method returns the first day of the week using the specified date and the definition of the first day of the week.

DateTime today = new(2023, 9, 5);
DateTime startOfWeek = today.StartOfWeek();

Random choice

The TakeRandom method returns a randomly chosen item from a given array.

int[] ints = [1, 2, 3];
int i = ints.TakeRandom();

For each

The ForEach method iterates over an enumerable and executes an action on each element.

int hits = default;
IEnumerable<string> strings = ["a", "ab", "b", "bb"];
strings.ForEach(x => x.Contains("a"), x => hits++);

Color to RGB hexadecimal representation

The ToRGBHexString method turns any System.Drawing.Color into its RGB hexadecimal string representation, with the prefix '#'.

Color color = Color.Green;
string hexString = color.ToRGBHexString();

Documentation

The complete API documentation can be found here.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 is compatible. 
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.

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
4.3.319 63 3/19/2026
4.3.222 325 2/22/2026
4.3.214 221 2/14/2026
4.2.122 250 1/22/2026
4.0.1202 991 12/2/2025
3.5.1120 613 11/20/2025
3.4.1104 368 11/4/2025
3.3.1026 278 10/26/2025
3.2.930 462 9/30/2025
3.1.916 438 9/16/2025
3.1.831 454 8/31/2025
3.0.817 349 8/17/2025
3.0.722 810 7/22/2025
2.15.710 352 7/10/2025
2.14.613 427 6/13/2025
2.13.530 347 5/30/2025
2.12.523 214 5/23/2025
2.11.518 264 5/18/2025
2.11.409 1,215 4/9/2025
2.11.323 448 3/23/2025
Loading failed