I want to attach a file 开发者_开发技巧from my C# code. I want a user interface from there user can easily select their file. What is scene of code or control in C#?
Thanks.
Try using the OpenFileDialog class for this.
It displays a nice dialog box where the user can select his file, and you can get the filename in return. It also supports filtering for different file types.
EDIT
I initially wrote FileDialog
, but OpenFileDialog
is of course the best one.
You mean something like the OpenFileDialog class?
精彩评论