WebSecurity- GetCreateDate()
❮WebSecurity
定義と使用
GetCreateDate ()メソッドは、指定されたメンバーシップアカウントが作成された日時を返します。
C#およびVB構文
WebSecurity.GetCreateDate(userName)
パラメーター
Parameter | Type | Description |
---|---|---|
userName | String | The user name |
戻り値
Type | Description |
---|---|
DateTime | The date and time the membership account was created |
エラーと例外
次の場合、 WebSecurityオブジェクトにアクセスすると、 InvalidOperationExceptionがスローされます。
- InitializeDatabaseConnection()メソッドが呼び出されていません
- SimpleMembershipが初期化されていない(またはWebサイト構成で無効になっている)
アカウントの作成日が利用できない場合、GetCreatedDate()メソッドは DateTime.MinValueを返します。
DateTime.MinValueの値は、0001年1月1日00:00:00.0000000です。
❮WebSecurity