I want to write a small function but it gives a error: Error CS0120 An object reference is required for the non-static field, method, or property Program.WriteSlow(string, int)
using System;
using System.Threading;
namespace Dank_meemr
{
class Program
{
int wordLength;
static void Main(string[] args)
{
WriteSlow("Hello World!", 10);
}
public void WriteSlow(string text, int delay)
{
wordLength = text.Length;
Console.Write(text[0]);
for (int i = 0; i < wordLength; i++)
{
Console.Write(text[0 + 1]);
Thread.Sleep(delay);
}
}
}
}
How do you fix this?