I am trying to make a simple program that makes a list of words then it picks a random word and then it prints that word. Everything works but I just can't seem to make the program print the word. This is my code so far.
using System;
using System.Collections.Generic;
namespace Hangman
{
class Program
{
List<String> words = new List<String> { "cat", "police", "conjuring", "sand", "hoppleflink", "defenestrait", "cumberground", "sexy shreck" };
public string PickRandom()
{
var random = new Random();
var wordCount = words.Count;
var randomNum = random.Next(wordCount);
var randomWord = words[randomNum];
return randomWord;
}
static void Main(string[] args)
{
Console.WriteLine();
}
}
}