private static bool Prompt(string message, ref string input) { var form = new PromptForm {Message = message}; var result = form.ShowDialog(); if (result == DialogResult.OK) { input = form.Input; return true; } return false; }