Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 使用If语句验证谁已登录。帐户类型_Vb.net_If Statement - Fatal编程技术网

Vb.net 使用If语句验证谁已登录。帐户类型

Vb.net 使用If语句验证谁已登录。帐户类型,vb.net,if-statement,Vb.net,If Statement,我需要检查两个会话变量中的一个是真是假。如果一个或两个都为真,则运行如果两个都为假,则不运行。很简单,我只是看起来有问题。我只是在两者都为真时运行注销例程 If Not Session("studentLoggedIn") Or Session("adminLoggedIn") Then Routines.LogOut() End If 只需添加一些括号: If Not (Session("studentLoggedIn") Or Session("adminLoggedIn")) T

我需要检查两个会话变量中的一个是真是假。如果一个或两个都为真,则运行如果两个都为假,则不运行。很简单,我只是看起来有问题。我只是在两者都为真时运行注销例程

If Not Session("studentLoggedIn") Or Session("adminLoggedIn") Then
    Routines.LogOut()
End If

只需添加一些括号:

If Not (Session("studentLoggedIn") Or Session("adminLoggedIn")) Then
    Routines.LogOut()
End If

工作得很有魅力。我为这么一个小问题使我自己和我的家人感到羞愧。英雄联盟