2009-05-27 42 views
0

我正在使用Visual Studio 2005 Team Edition,並試圖使用類視圖中的「創建實例」選項實例化類。構造函數有三個參數,其中兩個是DateTime結構。「創建實例」對話框中的鍵入參數

我的問題是:如何在Value框中輸入有效的日期時間?

我曾嘗試以下無濟於事:

28-05-2009 06:00:00 
"28-05-2009 06:00:00" 
new DateTime("28-05-2009 06:00:00") 
new System.DateTime("28-05-2009 06:00:00") 

在所有情況下,它只是顯示了Type Mismatch: 'System.DateTime' expected錯誤。

回答

0

您可以創建從類視圖一個新的DateTime實例,並在網格中的下拉列表中選擇。