CsharpUtilsLib 1.0.36

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

CsharpUtilsLib

Lib with methods to facilitate day-to-day development with C#.


  • Brazil

Format Brazilian documents and others things:

  • FormatPIS
  • FormatCPF
  • FormatCNPJ
  • FormatPhoneNumber
  • FormatCEP
  • FormatNCM
  • FormatFIPECode

Validate Brazilian documents and ohers things:

  • IsValidCNPJ
  • IsValidCPF
  • IsValidPis
  • IsValidVoterIDCard (Título de Eleitor)
  • IsValidCep

Others

  • BrazilProcessNumber (class)

  • Collections

Operations with collections:

  • ConcatLists
  • GetRandomElement
  • BubbleSort
  • MostFrequent
  • DictionaryIsNullOrEmpty
  • DictionaryIsNull
  • DictionaryIsEmpty
  • ListIsNullOrEmpty
  • ListIsNull
  • ListIsEmpty
  • AddIfNotNull (ICollection, IDictionary)
  • AddOrChangeValue
  • AddOrChangeValueByIndex
  • KeyValueIsNull
  • AddRangeIfNotNullOrEmpty
  • TryGetValue (IDictionary, Arrays, IList, KeyValuePair)
  • ToNullList
  • AddIfNotEmptyOrNull
  • KeyValueIsNullOrEmpty
  • ToDefaultListIfNull
  • ToDistinctList

  • Compression

Compress/Decompress text and bytes (Brotli/GZip/Deflate)

  • Compress
  • Decompress
  • CompressAsync
  • DecompressAsync
  • CompressString
  • DecompressString
  • CompressStringAsync
  • DecompressStringAsync

  • Crypto

Encryption algorithms

  • AesCrypto
  • Base32

  • Date

Operations with date objects:

  • GetAllYearDates
  • GetLastDayOfWeek
  • GetFirstDayOfWeek
  • LastDayOfMonth
  • GetAge
  • IsWeekend
  • IsWeekday
  • IsBetweenDates
  • GetNextWeekday
  • GetWeekdayCount
  • ConvertToDatetime

  • Enums

Operations with enums:

  • GetEnumValuesAndNames
  • GetEnumValues
  • GetDisplayName
  • GetEnumName
  • GetEnumValue

  • Extensions

    • GetRandom
    • With
    • Clone
    • ConvertTo

  • External

Operatons with external tools:

  • Companies (class)
  • FIPE table (class)
  • IP (class)
  • NCM (class)
  • National Brazil Holidays (class)
  • Taxs (class)
  • CEP (class)
  • Country (class)
  • GoogleTranslate (class)
  • ISBN (class)
  • Ticker (class)
  • Temperature (class)
  • Meal (class)
  • Inflation (class)
  • Geolocation (class)
  • English Dictionary (class)
  • Currency Converter (class)
  • Correios Tracking (class)
  • Correios Shipping (class)
  • IBGE News (class)
  • Inflation (class)

  • FilesDirectories

Operations with files and/or directories:

  • DeleteFile
  • DeleteFolder
  • IsXML
  • IsJson
  • IsHTML
  • CreateDirectoryIfNotExists
  • CreateFileIfNotExists
  • CreateLocalFileIfNotExists
  • CreateLocalDirectoryIfNotExists
  • FileTypeIdentify (class)
  • GetDirectorySizeContent
  • RenameFile
  • ClearDirectoryContent
  • CopyDirectoryContent
  • CreateTextFileWithContent
  • MergeFiles

  • HTTP

Operations with http requests:

  • HttpWrapper (class)
  • IHttpWrapper (interface)

  • Numerics

Operations with numbers:

  • CalculateLoanCost
  • CalculateNetPresentValue
  • GetLongestSequence
  • RandomNumbers
  • IsInRange
  • GetMissingNumbers
  • IsNumeric
  • GetAverage
  • Factorial
  • IsEven
  • IsOdd
  • IsPrime
  • StandardDeviation

  • Reflections

Operations with reflection:

  • GetDisplayName
  • DefaultConstructor
  • CreateInstance
  • InvokeMethod
  • SetPropertyValue
  • GetPropertyValue
  • GetStringPropertyValue
  • SetFieldValue
  • GetFieldValue
  • GetStringFieldValue
  • GetFullTypeName
  • HasPropertyOrField

  • SQL

Operations with databases (Mysql, PostgreSql, SqlLite, SqlServer):

  • InsertWithId / InsertWithIdAsync
  • Insert / InsertAsync
  • Update / UpdateAsync
  • Delete / DeleteAsync
  • Exists / ExistsAsync
  • SelectOne / SelectOneAsync
  • Select / SelectAsync
  • ExecuteNonQuery / ExecuteNonQueryAsync
  • ExecuteScalar / ExecuteScalarAsync
  • ExecuteReader / ExecuteReaderAsync

  • Texts

Operations with strings:

  • RemoveSpecialCharacters
  • SplitStringWithoutNullOrEmpty
  • GenerateRandomPassword
  • IsSequentialRepetition
  • RemoveAllWhitespace
  • MultiReplace
  • GetMostFrequentSeparator
  • CountOcurrences
  • RemoveDiacritics
  • MatchFirstOcurrency
  • MatchListOcurrencies
  • RemoveDuplicateWords
  • GetUniqueKey
  • RemoveDocumentMask
  • ToTitleCase
  • ConvertToString
  • SpecificSplit
  • Count
  • OnlyNumbers
  • SafeSubstring
  • ToByteArray
  • ToByteArrayAscii
  • ToAscii
  • ToUTF8

  • Web

Operations involving captures on the internet:

  • HtmlString (class)
  • CurrentPage and PageMetaData (Pagination classes)
  • RandomUserAgent (class)
  • Pagination
  • ToFormPostData
  • ToJsonPostData
  • GetQueryStringValue
  • GetAllQueryStringValues
  • AddQueryString
  • IsValidUrl
  • GetHeader
  • CombineUrl
  • ClearHtml

  • Global

Generic operations:

  • IsValidEmail
  • IsValidEAN
  • IsValidIpAddress

  • SystemResources

Monitoring system resources (memory, cpu and time):

  • TaskMonitor (class)

  • Tasks

Operations with tasks:

  • WhenAnyWithCompletionSource
  • WhenAllWithThrottling
  • WhenAllWithProgress
  • FireAndForget
  • Retry
  • OnFailure
  • WithTimeout
  • Fallback
  • TryAsync

  • XML

Operations with xml:

  • GetElementValue
  • AddElement
  • GetAttributeValue
  • RemoveElement
  • ToXmlElement
  • ToObject
  • SerializeObjectToXml
  • DeserializeXmlToObject
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
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
1.0.36 258 5 months ago
1.0.35 131 5 months ago
1.0.34 99 5 months ago
1.0.33 101 5 months ago
1.0.32 163 6 months ago
1.0.31 105 6 months ago
1.0.30 130 10 months ago
1.0.29 307 4/16/2024
1.0.28 127 4/15/2024
1.0.27 146 4/13/2024
1.0.26 341 1/14/2024
1.0.25 191 12/23/2023
1.0.24 157 12/17/2023
1.0.23 154 12/17/2023
1.0.22 158 8/29/2023
1.0.21 168 6/18/2023
1.0.20 176 6/5/2023
1.0.19 172 6/3/2023
1.0.18 172 5/18/2023
1.0.17 174 5/17/2023
1.0.16 215 4/9/2023
1.0.15 212 4/8/2023
1.0.14 218 4/8/2023
1.0.13 225 3/30/2023
1.0.12.1 223 3/29/2023
1.0.12 221 3/29/2023
1.0.11 223 3/29/2023
1.0.10 230 3/29/2023
1.0.9 241 3/28/2023
1.0.8 262 3/5/2023
1.0.7 252 3/4/2023
1.0.6 255 3/1/2023
1.0.5.1 260 3/1/2023
1.0.5 266 2/28/2023
1.0.4.1 258 2/28/2023
1.0.4 260 2/28/2023
1.0.3 264 2/25/2023
1.0.2 261 2/25/2023
1.0.1 272 2/15/2023
1.0.0 347 2/13/2023