-6

次のコードで混乱しています。ここで無効になっているようですか?

    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
4

1 に答える 1

1

C# 代入演算では、「=」は代入された値を返すため、上記のコードは次のように実行されます。

userName = (password = (authority = null));

また

authority = null;
password = authority;
userName = password;
于 2013-02-25T16:10:12.013 に答える