문제

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>...

올바른 솔루션이 없습니다

다른 팁

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top