我对以下代码感到困惑,看起来它在这里被禁用了?
public bool GetFormsCredentials(out Cookie authCookie, out string userName, out string password, out string authority) {
authCookie = null;
userName = password = authority = null;
return false;
}
不应该看起来像这样吗?
userName = myName
password = 12345
authority = someAuthority
答案 0 :(得分:1)
在C#赋值操作中,“=”返回赋值,因此上面的代码如下所示:
userName = (password = (authority = null));
或
authority = null;
password = authority;
userName = password;