I am trying to run this inline if statement
pRun.StartInfo.FileName = File.Exists("C:\\Test\\Data\\TestingPurposes\\" + UserName
+ "DailyInfo") ? pRun.StartInfo.UseShellExecute = true : MessageBox.Show("Please
verify that this file exists");
But I am getting a compile error of:
Type of conditional expression cannot be determined because there is no implicit conversion between 'bool' and 'System.Windows.Forms.DialogResult'
How can I remove this error and run the below statement? What I want to do is check if the file exists, if it does, open it. If it does not then produce the messagebox
with said message.