none
How to create private accessors in VS 2012

    Question

  • Hi,

    I can't figure out how I can create private accessors in a VS 2012 project.
    Is there any new way of doing that since 2010 ?

    Best regards,

    Thomas Bjørndahl

    Friday, September 28, 2012 11:31 AM

Answers

  • Hello Thomas,

    Thank you for your post.

    One thing to be aware of is that private accessors are deprecated in Visual Studio 2012. But we will no longer be able to create private accessor.

     But you can make your members as “Internal” and use the InternalsVisibleTo attribute.

    For more information, you can reference this article: Upgrading Unit Tests from Visual Studio 2010

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, October 01, 2012 2:51 AM
    Moderator

All replies