共用方式為


ManifestModifiedTime 屬性 (2003 系統)

取得 DateTime,指定上次修改應用程式資訊清單的時間。

命名空間:  Microsoft.VisualStudio.Tools.Applications.Runtime
組件:  Microsoft.VisualStudio.Tools.Applications.Runtime (在 Microsoft.VisualStudio.Tools.Applications.Runtime.dll 中)

語法

'宣告
Public ReadOnly Property ManifestModifiedTime As DateTime
'用途
Dim instance As ServerDocument
Dim value As DateTime

value = instance.ManifestModifiedTime
public DateTime ManifestModifiedTime { get; }

屬性值

型別:System. . :: .DateTime

DateTime,指定上次修改應用程式資訊清單的時間。

範例

下列程式碼範例會建立新的 ServerDocument,然後使用 ManifestModifiedTime 屬性顯示上次修改資訊清單的時間。這個範例需要對 Microsoft.VisualStudio.Tools.Applications.Runtime 組件的參考,並且在程式碼檔的開頭需要 Microsoft.VisualStudio.Tools.Applications.Runtime 命名空間的 Imports (適用於 Visual Basic) 或 using (適用於 C#) 陳述式。

Private Sub DisplayModifiedTime(ByVal fileName As String)
    If ServerDocument.IsCustomized(fileName) Then
        Dim serverDocument1 As ServerDocument = Nothing
        Try
            serverDocument1 = New ServerDocument(fileName)
            Dim dateTime1 As DateTime = serverDocument1.ManifestModifiedTime
            MsgBox("The manifest was last modified on " + _
                dateTime1.Date.ToString())
        Finally
            If Not serverDocument1 Is Nothing Then
                serverDocument1.Close()
            End If
        End Try
    Else
        MsgBox("The specified document is not " + _
            "customized.")
    End If
End Sub
private void DisplayModifiedTime(string fileName)
{
    if (ServerDocument.IsCustomized(fileName))
    {
        ServerDocument serverDocument1 = null;
        try 
        {
            serverDocument1 = new ServerDocument(fileName);
            DateTime dateTime1 = serverDocument1.ManifestModifiedTime;
            MessageBox.Show("The manifest was last modified on " +
                dateTime1.Date.ToString());
        }
        finally
        {
            if (serverDocument1 != null)
                serverDocument1.Close();
        }
    }
    else
    {
        MessageBox.Show("The specified document is not " +
            "customized.");
    }
}

使用權限

請參閱

參考

ServerDocument 類別

ServerDocument 成員

Microsoft.VisualStudio.Tools.Applications.Runtime 命名空間