User.IsAuthenticated Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether the user has been authenticated.
public:
property bool IsAuthenticated { bool get(); };
public bool IsAuthenticated { get; }
member this.IsAuthenticated : bool
Public ReadOnly Property IsAuthenticated As Boolean
True
if the user was authenticated; otherwise, False
.
This example verifies that the user has been authenticated before accessing a resource.
If My.User.IsAuthenticated Then
' Insert code to access a resource here.
End If
The My.User.IsAuthenticated
property allows your code to determine if the current user has been authenticated.
Huomautus
The exact behavior of My.User
object depends on the type of the application and on the operating system on which the application runs. For more information, see the User class overview.
Project type | Available |
---|---|
Windows Application | Yes |
Class Library | Yes |
Console Application | Yes |
Windows Control Library | Yes |
Web Control Library | Yes |
Windows Service | Yes |
Web Site | Yes |
Tuote | Versiot |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 5, 6, 7, 8, 9, 10 |
Tuotteen .NET palaute
.NET on avoin lähdekoodi projekti. Anna palautetta valitsemalla linkki: