0
我正在寫一個函數是這樣的:VB.NET中有一個函數從給定的目錄對象中獲取路徑對象嗎?
Private Function mostRecent(ByVal folder As Directory) As Date
'function to convert the given directory param as a path obj
Dim foldPathStr = Path.GetFullPath(foldPath)
Dim createDate As Date = Directory.GetCreationTime(foldPathStr)
Dim writeDate As Date = Directory.GetLastWriteTime(foldPathStr)
Dim readDate As Date = Directory.GetLastAccessTime(foldPathStr)
If createDate > writeDate And createDate > readDate Then
Return createDate
ElseIf writeDate > createDate And writeDate > readDate Then
Return writeDate
ElseIf readDate > createDate And readDate > writeDate Then
Return readDate
End If
End Function
我想,以填補在註釋行與內置命令,如果有的話。如果不是,請猜我會改變參數。