Cannot implicitly convert type 'int' to 'string'

前端 未结 4 1175
情话喂你
情话喂你 2021-01-28 01:26

My code:

public void FillMaxBankCode()
{
    try
    {
        DataSet ds = new DataSet();
        ds = bol.SelectMaxBankCode();
        string j = ds.Tables[0].         


        
4条回答
  •  抹茶落季
    2021-01-28 01:41

    int.Parse(..) is for converting a string containing digits into an integer. You are trying to perform the function int.Parse(..) on a string but then assign it to another string. That won't work because int.Parse(..) returns and integer. Read here about Int32.Parse (String) method.

提交回复
热议问题