-6

I'm confused at the following code, it looks like it's disabled here?

    public bool GetFormsCredentials(out Cookie authCookie, out string userName, out string password, out string authority) {
        authCookie = null;
        userName = password = authority = null;
        return false;
    }

shouldn't it look like this?

userName =  myName
password =  12345
authority = someAuthority
Caffeinated
  • 11,134
  • 39
  • 115
  • 205

1 Answers1

1

In C# assignment operation "=" returns assigned value, so above code exacutes as follows:

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

or

authority = null;
password = authority;
userName = password;
semao
  • 1,697
  • 12
  • 12