When Resharper argues with itself, how does one know which persona to give more credence?
I think I have found some code that does confuse Resharper (this is apparently a very unusual case - after using it for a day, I think Resharper is the bee's knees/the greatest thing since liquified bread, etc.).
With this line of code:
ICryptoTransform Encryptor = RijndaelCipher.CreateEncryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
Resharper tells me to "add argument name 'rgbkey'" and then "add argument name 'rgbIV'"
So that the line is then:
ICryptoTransform Encryptor = RijndaelCipher.CreateEncryptor(rgbKey: SecretKey.GetBytes(32), rgbIV: SecretKey.GetBytes(16));
When I run Resharper again, though, it says,
"Redundant argument name specification" - "Remove argument name specification" (rgbkey) (and then rgbIV).
It seems either way works fine, though...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…