Random Name Generator .Net Library
While I was working on my current project, I found I needed the ability to generate a name randomly. Pretty simple task, but I have been unable to google a free .net random name generating library that I could use. After reading this question, I came to the conclusion that no such library exists. So I decided to make one myself, and give it out for free in the hopes that it might generate a few hits.
You can try it out right here:
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.
For this demo post, I used jQuery's $.getJSON to perform the Ajax, and ASP.net MVC on the server side to receive the request. A controller there asks the library for a random name.
You are free to use the library however you like, commerical or otherwise, but I would expect you not to claim that you made it or sue me for some reason.
If anyone wants the source code, or a version of the library that compresses and decompresses the names lists (in order to trade disk size for in-memory computation), let me know!
2 Comments
haicalicsKany said
May 15 2010
thanks! :)
lets write them until the admit it, or stop doing it! i am writing them now!
:)
Test said
May 17 2010
Hello
G'night