This is a migrated thread and some comments may be shown as answers.

Code Analysis and Read Only

3 Answers 75 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
n65uk
Top achievements
Rank 1
n65uk asked on 28 May 2012, 03:12 PM
Is there any reason that the Code Analysis reports that private fields can be read only? Is there any reason why I should make them read only explicitly? It could well be just a personal preference.

It is not a problem and I can see that I can turn this warning off, I was purely interested to know why Telerik felt the need to include it as part of the warnings.

3 Answers, 1 is accepted

Sort by
0
Zdravko
Telerik team
answered on 29 May 2012, 02:51 PM
Hi,

 Thanks for the question. This is a feature that our customers needed and requested a lot. Some users prefer to set whether a field is readonly explicitly. That is why we implemented it in JustCode and there is an option to disable it when this does not match your personal preferences.
Thanks.

If you have any other questions, please do not hesitate to contact us.

Greetings,
Zdravko
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Steve
Top achievements
Rank 1
answered on 09 Oct 2013, 04:34 PM
Can I still do disable this in JustCode 2013 SP1? How do I disable this?

Thanks!
0
Zdravko
Telerik team
answered on 10 Oct 2013, 09:27 AM
Hello Arran,

 You can disable this warning from JustCode menu > Options > Code Analysis > Problems > C# > "Private field that can be made readonly" radio button.
I hope it helps.
Thanks.

Regards,
Zdravko
Telerik
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
Tags
Code Analysis
Asked by
n65uk
Top achievements
Rank 1
Answers by
Zdravko
Telerik team
Steve
Top achievements
Rank 1
Share this question
or