Myce.Extensions
1.0.2
dotnet add package Myce.Extensions --version 1.0.2
NuGet\Install-Package Myce.Extensions -Version 1.0.2
<PackageReference Include="Myce.Extensions" Version="1.0.2" />
<PackageVersion Include="Myce.Extensions" Version="1.0.2" />
<PackageReference Include="Myce.Extensions" />
paket add Myce.Extensions --version 1.0.2
#r "nuget: Myce.Extensions, 1.0.2"
#:package Myce.Extensions@1.0.2
#addin nuget:?package=Myce.Extensions&version=1.0.2
#tool nuget:?package=Myce.Extensions&version=1.0.2
MYCE.Extensions
MYCE (Makes Your Coding Easier) is a Nuget package for Visual Studio that contains a set of extensions for the most common types.
Library
CollectionExtensions
- AddIfNotNull() - Add an item to a collection if the item is not null
- AddRangeIfHasData() - Add a collection of items to a collection if the collections of items has data
DateTimeExtension
- FirstDayOfMonth() - Return the first day of the mounth for a given date
- DaysInMonth() - Return the number of days in the mounth for a given date
- LastDayOfMonth() - Return the last day of the mounth for a given date
- IsLeapYear() - Returns true if the date is in a leap year
- IsWorkDay() - Return true if the date is a workday (Monday to Friday)
- IsWeekend() - Return true if the date is a weekend (Saturday or Sunday). Holidays are not taken into account.
- PriorWorkday() - Return the prior workday (Monday to Friday) for a given date. Holidays are not taken into account.
- NextWorkday() - Return the next workday (Monday to Friday) for a given date. Holidays are not taken into account.
- Yesterday() - Return yesterday's date
- Tomorrow() - Return oomorrow's date
DecimalExtension
- EqualZero() - Return true if the value is equal zero
- GreaterThanZero() - Return true if the value is greater than zero
- GreaterThanOrEqualZero() - Return true if the value is greater than or equal zero
- LessThanZero() - Return true if the value is less than zero
- LessThanOrEqualZero() - Return true if the value is less than or equal zero
- IsBetween() - Compare object values is between other two values (inclusive)
DoubleExtension
- EqualZero() - Return true if the value is equal zero
- GreaterThanZero() - Return true if the value is greater than zero
- GreaterThanOrEqualZero() - Return true if the value is greater than or equal zero
- LessThanZero() - Return true if the value is less than zero
- LessThanOrEqualZero() - Return true if the value is less than or equal zero
- IsBetween() - Compare object values is between other two values (inclusive)
EnumerableExtensions
- Chunk() - Splits an enumerable into chunks of a specified size
- ContainsDuplicates() - Return true the if the enumerable constains a duplicate element
- DistinctRowsBy() - Return an enumerable of elements distinct by specific property
- ForEach<T>() - The foreach loop
- GetDuplicates() - Return the duplicate elements in an enumerable
- HasData() - Return true the if the enumerable object is not null and has any record
- IsNullOrEmpty() - Return true if the enumerable is not null and has any record
EnumExtensions
- GetDescription() - Return the enumerator description as a string
GuidExtension
- IsEmpty() - Return true if the guid is empty
- IsNotEmpty() - Return true if the guid is not empty
IntegerExtension
- EqualZero() - Return true if the value is equal zero
- GreaterThanZero() - Return true if the value is greater than zero
- GreaterThanOrEqualZero() - Return true if the value is greater than or equal zero
- LessThanZero() - Return true if the value is less than zero
- LessThanOrEqualZero() - Return true if the value is less than or equal zero
- IsBetween() - Compare object values is between other two values (inclusive)
StringExtension
- EmptyIfIsNull() - Return an empty string if the string is null
- KeepOnlyNumbers() - Remove letters and simbols, keeping only numbers
- KeepOnlyNumbersAndLetters() - Remove simbols keeping only numbers and letters
- KeepOnlyNumbersAndLettersAndSpaces() - Remove simbols keeping only numbers, letters and spaces
- RemoveSimbols() Remove simbols keeping only numbers, letters and spaces (if asked)
- RemoveAccents() - Remove accents
- ToEnum() - Converts string to Enum object
Notes
- Version 1.0.0 introduces multi-targeting support (
net6.0,net8.0,net9.0, andnetstandard2.0) and full nullability support. - In version 0.5.1 the Enumerable Extension DistinctBy was renamed to DistinctRowsBy to avoid the exception "CS0121 The call is ambiguous between the following methods or properties...".
Dependencies
- None
Developed by Fernando Prass
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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 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 was computed. 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 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| 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. |
-
.NETStandard 2.0
- System.Text.Encoding.CodePages (>= 10.0.3)
-
net6.0
- System.Text.Encoding.CodePages (>= 10.0.3)
-
net8.0
- System.Text.Encoding.CodePages (>= 10.0.3)
-
net9.0
- System.Text.Encoding.CodePages (>= 10.0.3)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Myce.Extensions:
| Package | Downloads |
|---|---|
|
Myce.Response
MYCE (Makes Your Coding Easier) Response is a response object to handle Error, Warning and Information messages |
|
|
Myce.FluentValidator
MYCE (Makes Your Coding Easier) FluentValidator is fluent validation class |
|
|
Myce.Validation
MYCE (Makes Your Coding Easier) Validation is fluent validation class |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2 | 383 | 2/22/2026 |
| 1.0.0 | 176 | 2/12/2026 |
| 0.5.2 | 247 | 6/2/2025 |
| 0.5.1 | 186 | 6/3/2024 |
| 0.5.0 | 221 | 9/24/2023 |
| 0.4.0 | 263 | 7/23/2023 |
| 0.3.0 | 326 | 4/12/2023 |
| 0.2.7 | 448 | 3/26/2023 |
| 0.2.6 | 351 | 3/13/2023 |
| 0.2.5 | 383 | 2/27/2023 |
| 0.2.0 | 366 | 2/26/2023 |
| 0.1.3 | 363 | 2/18/2023 |
| 0.1.2 | 434 | 1/30/2023 |
| 0.1.1 | 421 | 1/27/2023 |
| 0.1.0 | 687 | 1/21/2023 |
| 0.0.1 | 411 | 1/20/2023 |