mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-02 08:10:45 -08:00
Simplify Pizza (C#) folder structure
This commit is contained in:
21
69_Pizza/csharp/StringBuilderExtensions.cs
Normal file
21
69_Pizza/csharp/StringBuilderExtensions.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Text;
|
||||
|
||||
namespace Pizza
|
||||
{
|
||||
internal static class StringBuilderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Extensions for adding new lines of specific value.
|
||||
/// </summary>
|
||||
/// <param name="stringBuilder">Extended class.</param>
|
||||
/// <param name="value">Value which will be repeated.</param>
|
||||
/// <param name="numberOfLines">Number of lines that will be appended.</param>
|
||||
public static void AppendLine(this StringBuilder stringBuilder, string value, int numberOfLines)
|
||||
{
|
||||
for (int i = 0; i < numberOfLines; i++)
|
||||
{
|
||||
stringBuilder.AppendLine(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user