It seems _wordList is empty, so _wordList.Count - 1 = -1
First of all since _wordList is declared at your class level you should not prefix its use with type in the ProjectFile() method:
private async void ProjectFile()
{
var _Folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
_Folder = await _Folder.GetFolderAsync("Hangman");
StorageFolder sf = KnownFolders.DocumentsLibrary;
StorageFile file = await sf.GetFileAsync("Words.txt");
string result = await FileIO.ReadTextAsync(file);
_wordList.Add(result);
}
Then you should check for the content of _wordList before trying to use it in your GetWord() method:
public string Getword()
{
Random r = new Random();
int i = -1;
if (_wordList.Count > 0) {
i = r.Next(0, _wordList.Count - 1);
}
return (i > -1) ? _wordList.ElementAt(i) : string.Empty;
}
Hope this helps.