c# - Why does Resharper prefer consts over readonly? -
I have seen "Recharge Tips" under "General Practices and Code Improvement": Local variables or fields are static Change in .
I have also noticed that in Bill Wagner's book, "Language idiom" is the "read-only priority for casting", in which the risk of using the author was described. is.
My question is not only about the differences between reading and cons and when to use it, but why is a source kept as a common behavior / code improvement and on the other hand Is read as an idiom?
Private constants do not risk similar to public stability. Resharper is potentially suggesting performance optimization for those cases where an area is not visible externally.
Comments
Post a Comment