首页天道酬勤c#,c1

c#,c1

张世龙 05-04 02:52 84次浏览

//c )版权2021 by鸟哥using System; using system.collections.generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ng.io { publicclassfileutil } publicstructfilter { public string注释; 公共字符串滤波器; 公共过滤器(字符串过滤器,字符串过滤器)注释=zhushi; 过滤器=过滤器; }公共复盖字符串tostring () {返回注释(|)过滤器; }//summary//打开文件对话框时,用户将看到文件///summary//param name=' init path '/param///param name=' filters ' returnspublicstaticstringselectfiledialog (stringinitpath,ListFilter filters,string dlgTitle ) usingopenfiledialogdlg=ng //“请选择文件”; dlg.CheckFileExists=true; stringfilterstr=string.join('|',filters ); dlg.Filter=filterStr; dlg.InitialDirectory=initPath; if (DLG.showdialog (==dialogresult.ok ) {return dlg.FileName; }返回空值; }}参考: 1,https://www.cn blogs.com/lip-blog/p/7583465.html

VB难还是java难,java c#