An object-oriented programming language developed by Microsoft that can be used in .NET.
Hello,
This is a English speak forum so please next time use a language converter to English.
Here is a start that creates sentences taken from here and placed into a class
Usage
var paragraphs = Generator.LoremIpsum(2, 10, 10, 10, 10).Replace("</p>", "</p>\n");
File.WriteAllText("c.txt", paragraphs);
Class
public class Generator
{
public static string LoremIpsum(int minWords, int maxWords, int minSentences, int maxSentences, int numParagraphs)
{
var words = new[]{"lorem", "ipsum", "dolor", "sit", "amet", "consectetuer",
"adipiscing", "elit", "sed", "diam", "nonummy", "nibh", "euismod",
"tincidunt", "ut", "laoreet", "dolore", "magna", "aliquam", "erat"};
var rand = new Random();
int numSentences = rand.Next(maxSentences - minSentences) + minSentences + 1;
int numWords = rand.Next(maxWords - minWords) + minWords + 1;
var sb = new StringBuilder();
for (int positionIndex = 0; positionIndex < numParagraphs; positionIndex++)
{
sb.Append("<p>");
for (int index = 0; index < numSentences; index++)
{
for (int wordIndex = 0; wordIndex < numWords; wordIndex++)
{
if (wordIndex > 0)
{
sb.Append(" ");
}
sb.Append(words[rand.Next(words.Length)]);
}
sb.Append(". ");
}
sb.Append("</p>");
}
return sb.ToString();
}
}
In regarding
and then write the number of a user specified word in the file.
Will need more details, provide code if you can,.