MrSquirrely.Fun.Binary 1.0.0

dotnet add package MrSquirrely.Fun.Binary --version 1.0.0
                    
NuGet\Install-Package MrSquirrely.Fun.Binary -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="MrSquirrely.Fun.Binary" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MrSquirrely.Fun.Binary" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MrSquirrely.Fun.Binary" />
                    
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 MrSquirrely.Fun.Binary --version 1.0.0
                    
#r "nuget: MrSquirrely.Fun.Binary, 1.0.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.
#:package MrSquirrely.Fun.Binary@1.0.0
                    
#: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=MrSquirrely.Fun.Binary&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MrSquirrely.Fun.Binary&version=1.0.0
                    
Install as a Cake Tool

BinaryCharacters

Namespace: MrSquirrely.Fun.Binary Class: BinaryChars

A C# utility library that maps standard printable ASCII characters to their 8-bit binary literal representations. This project is designed for educational purposes to visualize how text data is stored in memory and to facilitate "absurd" coding challenges where strings are constructed bit-by-bit.

Features

The BinaryChars class provides public const char definitions for the standard ASCII set:

  • Uppercase Letters: UpperA through UpperZ
  • Lowercase Letters: LowerA through LowerZ
  • Digits: Digit0 through Digit9
  • Symbols & Punctuation: Extensive coverage including SymSpace, SymExclamation, SymAt, brackets, braces, and math symbols.

Installation

  1. Copy the BinaryCharacters.cs file into your .NET project.
  2. Ensure the namespace MrSquirrely.Fun.Binary is accessible to your code.

Usage

Since the characters are defined as char constants derived from binary literals (e.g., 0b_0100_0001), you can use them exactly like normal characters. They are most effective when used with a StringBuilder to construct words manually.

Basic Example

using MrSquirrely.Fun.Binary;
using System.Text;

public void CreateBinaryString()
{
    // Use StringBuilder for efficient appending
    StringBuilder builder = new StringBuilder();

    // Constructing "Hi!"
    // H: 0100 1000
    builder.Append(BinaryChars.UpperH);
    
    // i: 0110 1001
    builder.Append(BinaryChars.LowerI);
    
    // !: 0010 0001
    builder.Append(BinaryChars.SymExclamation);

    string result = builder.ToString();
    // Result: "Hi!"
}
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.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.0 316 12/8/2025