Naming Convention bug?

Thread is closed for posting
2 posts, 0 answers
  1. John
    John avatar
    11 posts
    Member since:
    Sep 2010

    Posted 01 Jun 2012 Link to this post

    Running vs2010 with Version Q2 2012 Internal Build (2012.2.531.4)

    When I switch private fields to use camel_Underscore it looks like the code change reccomendation stays as camelCase even after restarting VS2010 or doing a refresh on the CodeAnalysis.
    Am I just misunderstanding how that rule should translate private fields?

    What I was originally looking to do was _camelCase which I realize is accomplished by putting the underscore in the prefix box.


  2. Ivan
    Ivan avatar
    106 posts

    Posted 05 Jun 2012 Link to this post


    Thank you for your feedback. Setting a rule to camel_Underscore would allow words that are camel case to have underscores within them. For example camel_Case is allowed from this rule. However, camelCase words start always with a lower case letter. That is why a warning is shown when an identifier like this is found _camelCase and the prefix box is empty.
    As you have found out - if you want identifiers to start with a underscore, you should add underscore in the prefix box. If you want them to contain underscores set the rule to camel_Underscore.
    If you have any more questions or remarks, please do not hesitate to contact us again!

    the Telerik team

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

Back to Top