C# parse string “0” to integer

前端 未结 8 1076
抹茶落季
抹茶落季 2021-01-18 02:58

I have a new laptop at work and code that worked earlier in the week does not work today.

The code that worked before is, simplified:

while (dr.Read         


        
8条回答
  •  我在风中等你
    2021-01-18 03:49

    Are you sure it's "0" and not "null"? What exception do you get?

    EDIT:

    Just out of curiosity, if it is really faulting on int.Parse("0"), can you try int.Parse("0", CultureInfo.InvariantCulture);?

    Otherwise, post your query. Any joins?

提交回复
热议问题