Code Analysis and Read Only

4 posts, 0 answers
  1. n65uk
    n65uk avatar
    5 posts
    Member since:
    Jul 2012

    Posted 28 May 2012 Link to this post

    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.
  2. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 29 May 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Steve
    Steve avatar
    2 posts
    Member since:
    Sep 2013

    Posted 09 Oct 2013 Link to this post

    Can I still do disable this in JustCode 2013 SP1? How do I disable this?

    Thanks!
  5. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 10 Oct 2013 Link to this post

    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.
Back to Top