SEHException .net Conundrum

前端 未结 3 1338
囚心锁ツ
囚心锁ツ 2021-01-25 11:44

Can anyone explain why the below code throws an error. It can easily be fixed by either casting the -1 value to a decimal (-1M), by changing the operator overload to accept an i

3条回答
  •  一个人的身影
    2021-01-25 12:30

    No repro with the given code snippet. The code you used however strongly resembles the kind of code that falls over on an old bug in the C# compiler. The details are in this thread, Eric Lippert is already aware of it.

提交回复
热议问题