C# 错误1修改器';摘要';对于此项目无效

C# 错误1修改器';摘要';对于此项目无效,c#,.net,interface,abstract,C#,.net,Interface,Abstract,我正在尝试构建我的C#项目,我得到了错误: The modifier 'abstract' is not valid for this item 在以下界面中: namespace program.Drawing.Fields { using System; using System.Collections.Generic; using System.Runtime.CompilerServices; public interface IFieldHolder

我正在尝试构建我的C#项目,我得到了错误:

The modifier 'abstract' is not valid for this item
在以下界面中:

namespace program.Drawing.Fields
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.CompilerServices;

    public interface IFieldHolder
    {
        abstract event FieldChangedEventHandler FieldChanged;

        void AddField(Field field);
        Field GetField(FieldType fieldType);
        List<Field> GetFields();
        bool HasField(FieldType fieldType);
        void RemoveField(Field field);
        void SetFieldValue(FieldType fieldType, object value);
    }
}

接口的定义是抽象的,因为实现类必须满足它们。不能在它们内部使用abstract关键字。(作用域也是如此)

接口的定义是抽象的,因为实现类必须满足它们。不能在它们内部使用abstract关键字。(范围界定也是如此)

我不确定您在这里想做什么,但您可能会发现以下信息很有帮助:

“接口和接口成员是抽象的;接口不提供默认实现。”


也就是说,接口的成员是隐式抽象的。

我不确定您在这里想做什么,但您可能会发现以下信息很有帮助:

“接口和接口成员是抽象的;接口不提供默认实现。”


也就是说,接口的成员是隐式抽象的。

@Matthew:他的接口没有定义任何字段……问题是什么?删除
abstract
解决了这个问题。@Matthew:他的界面没有定义任何字段……问题是什么?删除
abstract
可修复此问题。
The modifier 'abstract' is not valid for this item