OpenFileDialog default path

前端 未结 8 1403
甜味超标
甜味超标 2020-12-01 14:13
using (var openFileDialog1 = new OpenFileDialog())
        {
            openFileDialog1.Reset();
            if (!string.IsNullOrEmpty(ExcelFilePath))
            {         


        
8条回答
  •  佛祖请我去吃肉
    2020-12-01 14:31

    Also, to set the default extension you should set FilterIndex property instead of DefaultExt. see: https://stackoverflow.com/a/6104319/381082

    Here's a good article on the OpenFileDialog in C#: http://www.c-sharpcorner.com/uploadfile/mahesh/openfiledialog-in-C-Sharp/

提交回复
热议问题