Default parameter specifiers are not permitted

后端 未结 4 1488
无人共我
无人共我 2020-12-10 05:35

I have the following code that gives the error

Default parameter specifiers are not permitted

How can this be fixed?

4条回答
  •  一向
    一向 (楼主)
    2020-12-10 06:13

    Optional parameters are a feature of C# 4, not present in earlier versions. Since you're using .NET 3.5, you can't use optional parameters.

    Either switch to .NET 4.0, or use overloaded methods instead.

提交回复
热议问题