WebSecurity - GetCreateDate()


WebSecurity オブジェクト

定義と用法

GetCreateDate()メソッドは、指定されたメンバーアカウントが作成された日時を返します。

C# と VB の構文

WebSecurity.GetCreateDate(userName)


参数

参数 类型 描述
userName String 用户名


返回值

类型 描述
DateTime 会員アカウント作成の日時


エラーと例外

以下の場合、いかなるWebSecurityオブジェクトへのアクセスは、例外をスローするInvalidOperationException:

  • InitializeDatabaseConnection()メソッドが呼び出されていません
  • SimpleMembership初期化されていない(またはサイト設定で無効になっている)

アカウント作成日が無効な場合GetCreatedDate()方法返回DateTime.MinValue。

DateTime.MinValue の値は 00:00:00.0000000, January 1, 0001 です。


技术数据

名称 值
Namespace WebMatrix.WebData
Assembly WebMatrix.WebData.dll


WebSecurity オブジェクト 其他扩展