C# “must declare a body because it is not marked abstract, extern, or partial”

前端 未结 7 588
轻奢々
轻奢々 2020-12-15 15:05

I\'m not sure why i\'m getting this error to be honest.

private int hour
{
    get;
    set
    {
        //make sure hour is positive
        if (value <         


        
相关标签:
7条回答
  • 2020-12-15 15:41

    I got the same error message because I had a function with a parameter named with a reserved word.

       public int SaveDelegate(MyModel.Delegate delegate)
    

    Renaming the variable delegate solved the problem.

    0 讨论(0)
提交回复
热议问题