我的道歉,如果這個問題已經被問,但我與C#編程很新,我很努力解決我有一個日期的問題。我寫了發現已經我已經選擇兩個不同的日期時間之間建立的文件程序,並檢查屬性{選擇}文件:它寫,但日期時間想不出:(得到兩個之間的文件創建日期時間
private bool Check_Attributes(FileInfo finfo)
{
//check Attributes
FileAttributes Fattributes = new FileAttributes();
Fattributes = finfo.Attributes;
SearchSetAttrib = new List<FileAttributes>();
if (chkattributes.Checked == true)
{
SearchSetAttrib.Clear();
if (chkreadonly.Checked == true)
SearchSetAttrib.Add(FileAttributes.ReadOnly);
if (chksystem.Checked == true)
SearchSetAttrib.Add(FileAttributes.System);
if (chkhidden.Checked == true)
SearchSetAttrib.Add(FileAttributes.Hidden);
if (chkNormal.Checked == true)
SearchSetAttrib.Add(FileAttributes.Normal);
if (chkArchiv.Checked == true)
SearchSetAttrib.Add(FileAttributes.Archive);
foreach (FileAttributes FileAtt in SearchSetAttrib)
{
if ((Fattributes & (FileAtt)) != 0)
ReAttrib = true;
else
return ReAttrib = false;
}
}
else
ReAttrib = true;
return ReAttrib;
}
...又是怎樣的代碼片段,在所有相關的? – JeffRSon