Check if File exists in directory ignoring the extension

后端 未结 3 1901
死守一世寂寞
死守一世寂寞 2021-01-12 05:59

I am using .NET 2.0 and Linq is out of question. I would like to check if file exists inside a directory without knowledge of the file extension.

I

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-12 06:48

    You can use DirectoryInfo.GetFiles() to have a FileInfo[] instead of a String[].

提交回复
热议问题