Hi @Андрей Буряченко , Welcome to Microsoft Q&A,
You used poor judgment.
The correct way to write it is as follows:
openFileDialog1.Filter = "File hexadecimal (*.hex)|*.hex";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
string selectedFilePath = openFileDialog1.FileName;
// Perform operations here, such as reading and processing .hex files
MessageBox.Show("The selected file path is: " + selectedFilePath);
}
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.