I need to return a string from a button method .How can i do that?
private string folderPathButton_Click(object sender, EventArgs e)
{
FolderBrowserDialog folderBrowser = new FolderBrowserDialog();
folderBrowser.ShowDialog();
string folderPath = folderBrowser.SelectedPath;
return folderPath;
}
On that method on button click i get the folder path.Now i need to return it.But this code is not working? Can anybody help me to solve the problem??How can i return the folder path and call it from another method??