RandomNameGeneratorNG 2.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package RandomNameGeneratorNG --version 2.0.1                
NuGet\Install-Package RandomNameGeneratorNG -Version 2.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="RandomNameGeneratorNG" Version="2.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RandomNameGeneratorNG --version 2.0.1                
#r "nuget: RandomNameGeneratorNG, 2.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.
// Install RandomNameGeneratorNG as a Cake Addin
#addin nuget:?package=RandomNameGeneratorNG&version=2.0.1

// Install RandomNameGeneratorNG as a Cake Tool
#tool nuget:?package=RandomNameGeneratorNG&version=2.0.1                

DotNetRandomNameGenerator

Generates random people and place names drawn from freely available US census data.

Join the chat at https://gitter.im/Urriellu/DotNetRandomNameGenerator

Nuget package link

The library contains a stripped down lists of human names from the US Census names list, and a list of place names from another census list. The library allows you to get random first and last names or both and you can get male and female first names. You can also generate random place names as well. To access this functionality create a NameGenerator in namespace RandomNameGenerator, and call one of the functions like GenerateRandomFirstAndLastName(). The functions names describe literally and simply what those functions do.

Typical Usage (generating a person name):

var personGenerator = new PersonNameGenerator();
var name = _personGenerator.GenerateRandomFirstAndLastName();
	
Console.WriteLine(name); //Outputs some random first and last name combination in the format "{first} {last}" example: "Mark Rogers"

Generating a place name:

var placeGenerator = new PlaceNameGenerator();
var name = _personGenerator.GenerateRandomPlaceName();
	
Console.WriteLine(name); //Outputs some random place name, example: "Hoboken"

Male and female first names can be generated with or without a last name

var personGenerator = new PersonNameGenerator();
var name = _personGenerator.GenerateRandomFemaleFirstName();
	
Console.WriteLine(name); //Outputs some random first female name, example: "Jane"

More than one name can be generated at a time. There are a variety of functions that let you choose gender if desired, and the number of names to be produced.

var personGenerator = new PersonNameGenerator();
var numberOfNames = 1;
var names = _personGenerator.GenerateRandomFemaleFirstAndLastName(numberOfNames);
var name = names.First();
	
Console.WriteLine(name); //Outputs some random first and last female name combination in the format "{first} {last}" example: "Rose Jones"

An existing random object can be passed in, rather than generated by the name generator.

var randomObj = new Random(42);
var personGenerator = new PersonNameGenerator(randomObj);
var name = personGenerator.GenerateRandomFemaleFirstName();
	
Console.WriteLine(name); //Outputs some random first female name using the passed Random obj, example: "Lindsay"

This functionality can also be exercised has an extension method to a random object.

var randomObj = new Random(42);
var name = randomObj.GenerateRandomFemaleFirstName();
	
Console.WriteLine(name); //Outputs some random first female name using the passed Random obj, example: "Lindsay"
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net5.0

    • No dependencies.
  • net6.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
2.0.2 9,378 1/7/2023
2.0.1 6,768 8/8/2021
2.0.0 346 8/8/2021