Added helper class

This commit is contained in:
Alexander 2019-11-11 19:21:58 +02:00
parent 7c367028ff
commit 598006d735

View file

@ -0,0 +1,24 @@
using System;
using System.Windows.Forms;
namespace Crypto_Notepad
{
public static class WinFormsExtensions
{
public static void AppendLine(this TextBox source, string value)
{
if (source.Text.Length == 0)
source.Text = value;
else
source.AppendText("\r\n" + value);
}
public static void Times(this int count, Action action)
{
for (int i = 0; i < count; i++)
{
action();
}
}
}
}