'Visual Studio c# Error CS7036 Method Call

I keep getting the CS7036 error in Visual Studio and I cant figure out how to correct it. the error code CS7306 occurs in the eROISImport.GenerateRport(); call. I'm not sure what parameters it wants since in the GenerateReport method creation at the top the parameters are defined. I have tried to define the parameter in the eROISIMPORT.GenerateReport but it is not accepted when I use the totalApplied or any others parameters that are defined in the GenerateReport method. Another issue I get is in the GenerateReport method I get the CS0051 Inconsistent accessibility parameter type List. This error occurred when I changed private static to public void. I appreciate any help with this.

 public void GenerateReport(int totalUnknown, int totalApplied, int totalAccepted, int totalRejected, int totalDropped, int totalTesting, int totalNonCompliance, int totalNoncompliance8453, int totalNoncomplianceFieldMonitoring, int totalRevoked, List<DataInput>dataInputList)   

    public static Main(string[] args)
    {
        EROIRSImport eROIRSImport = new EROIRSImport();


        eROIRSImport.ImportFile(args);
        eROIRSImport.GenerateReport();


Solution 1:[1]

I get the CS0051 Inconsistent accessibility parameter type List<DataInput>.
This error occurred when I changed private static to public void

That means DataInput isn't public.

A method can't expose (as a parameter or a return type) a type that is less accessible than the method itself, because consuming code won't be able to use the method if they can't know the types it exposes.

Either change DataInput to also be public or change the accessibility of the method to match the accessibility of DataInput. (internal? private?)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David