DotNetBesties 1.2.2
dotnet add package DotNetBesties --version 1.2.2
NuGet\Install-Package DotNetBesties -Version 1.2.2
<PackageReference Include="DotNetBesties" Version="1.2.2" />
<PackageVersion Include="DotNetBesties" Version="1.2.2" />
<PackageReference Include="DotNetBesties" />
paket add DotNetBesties --version 1.2.2
#r "nuget: DotNetBesties, 1.2.2"
#:package DotNetBesties@1.2.2
#addin nuget:?package=DotNetBesties&version=1.2.2
#tool nuget:?package=DotNetBesties&version=1.2.2
β¨ DotNetBesties
A comprehensive collection of powerful helper classes and extension methods for .NET 9+ and .NET 10 applications. This library provides productivity-boosting utilities for common development tasks including string manipulation, validation, formatting, and more.
π Features
π String Extensions & Helpers
- Null/Empty Checks:
IsNullOrEmpty(),IsNullOrWhiteSpace(),HasValue() - Validation:
IsNumeric(),IsAlphanumeric() - Case Conversion:
ToPascalCase(),ToCamelCase(),ToKebabCase(),ToSnakeCase(),ToTitleCase() - Encoding:
ToBase64(),FromBase64() - Manipulation:
Truncate(),Reverse(),RemoveWhitespace(),CollapseWhitespace() - Comparison:
EqualsIgnoreCase(),StartsWithIgnoreCase(),EndsWithIgnoreCase() - Substring Operations:
Left(),Right(),Mid() - Replace:
ReplaceFirst(),ReplaceLast() - Utilities:
CountOccurrences(),Repeat(),EnsureStartsWith(),EnsureEndsWith()
π’ Numeric Extensions
- Int Extensions: Formatting, parsing, range checking
- Long Extensions: Large number operations
- Float/Double Extensions: Precision handling
- Decimal Extensions: Financial calculations
π Date & Time Extensions
- DateTime Extensions: Formatting, manipulation, comparisons
- DateOnly Extensions: Date-specific operations (.NET 6+)
- TimeOnly Extensions: Time-specific operations (.NET 6+)
- DateTimeOffset Extensions: Timezone-aware operations
- TimeSpan Extensions: Duration calculations
β Validation Helpers
- IBAN Validation: International bank account number validation with mod-97 algorithm
- Credit Card Validation: Luhn algorithm implementation
- ISBN Validation: Book number validation (ISBN-10 and ISBN-13)
- VIN Validation: Vehicle identification number validation
- Phone Number Validation: International phone number formats
- Postal Code Validation: Country-specific postal code validation
- Internet Validation: Email, URL, and IP address validation
π¨ Format Helpers
- CollectionHelper: List and array formatting
- ColorHelper: Color conversion and manipulation
- GuidHelper: GUID generation and formatting
- ObjectHelper: Object serialization and formatting
π Security & Cryptography
- EncryptionHelper: Encryption and decryption utilities
π¦ Serialization
- JsonHelper: JSON serialization/deserialization utilities
π οΈ Common Utilities
- RegexHelper: Regular expression utilities
- StreamHelper: Stream operations
- CultureInfoHelper: Culture-specific operations
π― Other Extensions
- EnumExtensions: Enum utilities and parsing
- BoolExtensions: Boolean operations
- CharExtensions: Character operations
- ColorExtensions: System.Drawing.Color extensions
- ObjectExtensions: Generic object operations
- CollectionExtensions: IEnumerable and collection extensions
π¦ Installation
Using .NET CLI
dotnet add package DotNetBesties
Using Package Manager Console
Install-Package DotNetBesties
Using PackageReference
<PackageReference Include="DotNetBesties.Helpers" Version="1.0.0" />
π― Quick Start
String Extensions Example
using DotNetBesties.Helpers.Extensions;
// Null/Empty checks
string? name = null;
if (name.IsNullOrEmpty())
{
name = "John Doe";
}
// Case conversion
string title = "hello world".ToTitleCase(); // "Hello World"
string variable = "HelloWorld".ToCamelCase(); // "helloWorld"
string url = "Hello World".ToKebabCase(); // "hello-world"
// String manipulation
string text = "This is a very long text".Truncate(10); // "This is..."
string encoded = "Hello".ToBase64(); // "SGVsbG8="
string decoded = encoded.FromBase64(); // "Hello"
// Comparison
bool matches = "Hello".EqualsIgnoreCase("hello"); // true
Validation Examples
using DotNetBesties.Helpers.Validation;
// IBAN validation
bool isValid = IbanValidationHelper.IsValidIban("DE89370400440532013000");
string formatted = IbanValidationHelper.FormatIban("DE89370400440532013000");
// Result: "DE89 3704 0044 0532 0130 00"
// Credit card validation
bool isValidCard = CreditCardValidationHelper.IsValidCreditCard("4532015112830366");
// ISBN validation
bool isValidIsbn = IsbnValidationHelper.IsValidIsbn("978-3-16-148410-0");
// Phone number validation
bool isValidPhone = PhoneNumberValidationHelper.IsValidPhoneNumber("+49 123 456789", "DE");
DateTime Extensions Example
using DotNetBesties.Helpers.Extensions;
DateTime now = DateTime.Now;
// Date operations
DateTime tomorrow = now.AddDays(1);
bool isWeekend = now.DayOfWeek == DayOfWeek.Saturday || now.DayOfWeek == DayOfWeek.Sunday;
// Formatting
string formatted = now.ToString("yyyy-MM-dd");
Collection Extensions Example
using DotNetBesties.Helpers.Extensions;
var numbers = new[] { 1, 2, 3, 4, 5 };
// Collection operations
bool hasItems = numbers.Any();
int sum = numbers.Sum();
π Project Structure
DotNetBesties.Helpers/
βββ src/
β βββ DotNetBesties.Helpers/
β βββ Common/ # Common utilities
β β βββ CultureInfoHelper.cs
β β βββ RegexHelper.cs
β β βββ StreamHelper.cs
β βββ Cryptology/ # Encryption utilities
β β βββ EncryptionHelper.cs
β βββ Extensions/ # Extension methods
β β βββ BoolExtensions.cs
β β βββ CharExtensions.cs
β β βββ CollectionExtensions.cs
β β βββ ColorExtensions.cs
β β βββ DateOnlyExtensions.cs
β β βββ DateTimeExtensions.cs
β β βββ DateTimeOffsetExtensions.cs
β β βββ DecimalExtensions.cs
β β βββ DoubleExtensions.cs
β β βββ EnumExtensions.cs
β β βββ FloatExtensions.cs
β β βββ GuidExtensions.cs
β β βββ IntExtensions.cs
β β βββ LongExtensions.cs
β β βββ ObjectExtensions.cs
β β βββ StringExtensions.cs
β β βββ TimeOnlyExtensions.cs
β β βββ TimeSpanExtensions.cs
β βββ Format/ # Formatting helpers
β β βββ BoolHelper.cs
β β βββ CharHelper.cs
β β βββ CollectionHelper.cs
β β βββ ColorHelper.cs
β β βββ DateOnlyHelper.cs
β β βββ DateTimeHelper.cs
β β βββ DateTimeOffsetHelper.cs
β β βββ DecimalHelper.cs
β β βββ DoubleHelper.cs
β β βββ EnumHelper.cs
β β βββ FloatHelper.cs
β β βββ GuidHelper.cs
β β βββ IntHelper.cs
β β βββ LongHelper.cs
β β βββ ObjectHelper.cs
β β βββ StringHelper.cs
β β βββ TimeOnlyHelper.cs
β β βββ TimeSpanHelper.cs
β βββ Serialization/ # Serialization utilities
β β βββ JsonHelper.cs
β βββ Validation/ # Validation helpers
β βββ CreditCardValidationHelper.cs
β βββ IbanValidationHelper.cs
β βββ InternetValidationHelper.cs
β βββ IsbnValidationHelper.cs
β βββ PhoneNumberValidationHelper.cs
β βββ PostalCodeValidationHelper.cs
β βββ VinValidationHelper.cs
βββ tests/
βββ DotNetBesties.Helpers.Tests/
βββ Common/ # Common tests
βββ Cryptology/ # Encryption tests
βββ Extensions/ # Extension tests
βββ Format/ # Format tests
βββ Serialization/ # Serialization tests
βββ Validation/ # Validation tests
π§ͺ Testing
The project includes comprehensive unit tests using TUnit, covering all helper methods and extension functions.
# Run all tests
dotnet test
# Run tests with coverage
dotnet test --collect:"XPlat Code Coverage"
βοΈ Requirements
- .NET 9.0 or higher
- C# 13.0 or higher
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Coding Standards
- Follow C# coding conventions
- Include XML documentation for public APIs
- Write unit tests for new features
- Some Integration tests are implemented, but not all. Please consider adding more integration tests for new features.
- Ensure all tests pass before submitting PR
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Built with β€οΈ by the Moprojo team
- Inspired by community needs for productive .NET development
- Special thanks to all contributors
π¬ Support
- π Issues: GitHub Issues
- π‘ Discussions: GitHub Discussions
- π§ Email: info@moprojo.de
πΊοΈ Roadmap
- Add more validation helpers
- Performance optimizations
- Additional collection extensions
- Async/await extensions
- More cryptography utilities
π Stats
Made with β€οΈ by Moprojo
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net10.0
- No dependencies.
-
net9.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.2.2 | 139 | 2/11/2026 |
Multi-targeting support for .NET 9 and .NET 10.