![](/img/trans.png)
[英]SaveFileDialog should I use the FilterIndex property or the extension of the FileName property?
[英]`MessageBox`, `SaveFileDialog` in .NET: which version should I use?
我應該使用哪一個,有什么區別:
System.Windows.Forms.MessageBox
有關System.Windows.Forms.SaveFileDialog
和Microsoft.Win32.SaveFileDialog
的相同問題。
我只需要顯示一個消息框並保存文件對話框(也在Windows XP上工作)。
正確的重新標記是值得贊賞的。
先謝謝,kh。
System.Windows.Forms命名空間中的控件適用於WinForms應用程序。 System.Windows命名空間中的控件適用於WPF / Silverlight應用程序。 因此,選擇與您的應用程序類型匹配的控件。
一個來自WPF,另一個是經典的Windows消息框。
System.Windows是WPF命名空間System.WIndows.Forms是Win32經典命名空間。
在我的Windows窗體應用程序中,我將使用System.Windows.Forms.MessageBox。
SaveDialog也是如此
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.