C# Error Message: “Inconsistent Accessibility”

While working in C#, I got this error that was at first a bit difficult to decipher. I removed some of the actual variable terminology, but the overall error message is below.

Inconsistent accessibility: property type is less accessible than property

All this error message really means is that there is a public method that is illegally exposing a private property. Therefore, an easy fix (but not necessary the right one), is to change private property to public. I say this may not be the right approach because this may leave a security hole in your page and may not be how the page was originally designed.

Share and Enjoy:
  • Digg
  • DotNetKicks
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • Netvibes
  • Reddit
  • StumbleUpon
You can leave a response, or trackback from your own site.

4 Responses to “C# Error Message: “Inconsistent Accessibility””

  1. Anonymous says:

    C# Error Message: “Inconsistent Accessibility”:

    public namespace.class var;

  2. Jeannine says:

    Thanks, just what I was looking for

  3. Tammy says:

    Exactly what I was looking For, Thank you.

  4. Ryan says:

    What a great concise answer. Thanks a lot, now I may get my assignment handed in on time :D

Leave a Reply