技巧1
有一个类似VB6的OpenFileDialog控件,不过专门用于FileOpen操作,不再跟Font等对话框混在一起。主要属性:MultiSelect,ShowReadOnly,ReadOnlyChecked,Filter, 例子:
// Open a file open dailog
dlgFile.Filter = "XML files(*.xml)|*.xml|All files (*.*)|*.*";
dlgFile.ShowDialog();
strFilePath=dlgFile.FileName;
if (strFilePath=="" ) return; 技巧2
Try
{
Cursor.Current=Cursors.WaitCursor;
}
Catch
{
}
Finally
{
Cursor.Current=Cursors.Default;
} 技巧3
// DoEvents in C#
Application.DoEvents(); 技巧4
// Replace method of string
strTmp.Replace(old,new); 技巧5
// Set Nothing in C#
obj = null; 技巧6
// C# Array declaration
int[] varname;
















