Question

I kept receiving the error message:

struct system.Int32 does not have type parameters

in my interface method below. Does anyone know what am doing wrong?

public class StatementRptParamId {
  public Int32 ReportParameterId { get; set; }
}


public interface IStatementRptParamId {
  Int32<StatementRptParamId> GetStatementRptParameter(string connectionString, string customerNumber);
}

Error happens on this line: Int32<StatementRptParamId>...

No correct solution

OTHER TIPS

It looks like you're trying to use Int32 as a generic, which is incorrect. It looks like you think you're specifying the return type of your method call, which you also don't need to do. You've already given a type to the name. Just change your definition to:

StatementRptParamId GetStatementRptParameter(string connectionString, 
    string customerNumber);

You can then use the field on the class to get your value:

var val = GetStatementRptParameter(someConnectionString, someCustomerNumber);
var id = val.ReportParameterId;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top