MyClassLibrary027.Utilities 1.0.1

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

MyClassLibrary027.Utilities

This package provides utility functions for common tasks such as checking if a number is prime and splitting large files into smaller chunks.

Functions

1. CheckPrime(int prime)

Checks if a given number is a prime number.

Parameters:
  • prime (int): The number to check for primality.
Example Usage:
Utilities.CheckPrime(5);  // Output: Prime Number
Utilities.CheckPrime(10); // Output: Not Prime Number

2. SplitFile(string filePath, int n = 10000)

Splits a large file into smaller chunks, each with a maximum size of n characters. The default value of n is 10,000 characters.

Parameters:
  • filePath (string): The path to the file to be split.
  • n (int, optional): The maximum size of each chunk (default is 10,000 characters).
Example Usage:
Utilities.SplitFile("path/to/largefile.txt", 5000);

This will split the file into chunks of 5,000 characters each and save them as separate files in the same directory.

Installation

You can install the package from NuGet.org:

dotnet add package MyClassLibrary027.Utilities

Or, if you're using Visual Studio, you can search for the package in the NuGet Package Manager and install it from there.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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.1 136 3/17/2025