Inconsistent accessibility: The parameter type "" is less accessible than the method "".

Source: Internet
Author: User

I encountered this error when writing a program in the Visual Studio 2003 Development Environment:

D: wwwzysggooglesitemaps. aspx. CS (121): inconsistent accessibility: parameter type "zysg. site. freq "is more efficient than" zysg. site. sitemapfeedgenerator. writeitem (string, zysg. site. freq) "low access.

In the ASPNET environment, the variable access permissions are strictly set.

The error environment is like this. In a namespace, an eunm Enumeration type is defined and then referenced in a function.

This is defined as an error in direct reference of Enum freq {always, hourly, daily, weekly, monthly, yearly, never.

 

The solution to the problem is to add an accessible definition: Public Enum freq {so that it is OK.

Ii. /// <summary>
/// Company category Interface
/// </Summary>
Public interface icompanycategory
{
/// <Summary>
/// Obtain the company category
/// </Summary>
/// <Returns> </returns>
Ilist getcompanycategory ();

/// <Summary>
/// ADD company category
/// </Summary>
/// <Param name = "companycategory"> </param>
Void insertcompanycategory (companycategoryinfo companycategory );

The access level of the companycateinfo class is higher than that of the void insertcompanycategory class. At the beginning, I didn't notice the companycateinfo level, which caused this error and changed it to public.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.