簡體   English   中英

C#錯誤-未實現接口成員

[英]C# Error - Does not implement interface member

我有一個用C#編寫的模糊代碼,我需要構建和制作一個exe。 但是,在VS 2012中構建項目時出現錯誤。錯誤指出:

錯誤:

xf1555389a70c7d5a.x39b8e005139a3d89.xdd6080d77f5137d7'未實現接口成員'System.Collections.IEnumerable.GetEnumerator()'。 'xf1555389a70c7d5a.x39b8e005139a3d89.xdd6080d77f5137d7.GetEnumerator()'無法實現'System.Collections.IEnumerable.GetEnumerator()',因為它沒有匹配的返回類型'System.Collections.IEnumerator'。

檔案:x39b8e005139a3d89.cs

這是xdd6080d77f5137d7.cs文件混淆的代碼:

public class xdd6080d77f5137d7 : IEnumerable<x39b8e005139a3d89.xe657754b6d8c9c0b>, IEnumerable, IComparable, x39b8e005139a3d89.xe657754b6d8c9c0b
    {
      private readonly LOG_CODES _x9035cf16181332fc;
      private readonly BOARDS _x337e217cb3ba0627;
      private readonly DeviceMode _xa4aa8b4150b11435;

  public LOG_CODES xdc1af3a17717bf0a
  {
    get
    {
      return this._x9035cf16181332fc;
    }
  }

  public BOARDS xaf77e81a71d6921f
  {
    get
    {
      return this._x337e217cb3ba0627;
    }
  }

  public DeviceMode xad98d2ceb0921f0a
  {
    get
    {
      return this._xa4aa8b4150b11435;
    }
  }

  public xdd6080d77f5137d7(LOG_CODES code, BOARDS source, DeviceMode mode)
  {
    this._x9035cf16181332fc = code;
    this._x337e217cb3ba0627 = source;
    this._xa4aa8b4150b11435 = mode;
  }

  public xdd6080d77f5137d7(LOG_CODES code, DeviceMode mode)
  {
    this._x9035cf16181332fc = code;
    this._x337e217cb3ba0627 = BOARDS.boardNULL;
    this._xa4aa8b4150b11435 = mode;
  }

  public xdd6080d77f5137d7(LOG_CODES code, BOARDS source)
  {
    this._x9035cf16181332fc = code;
    this._x337e217cb3ba0627 = source;
    this._xa4aa8b4150b11435 = DeviceMode.None;
  }

  public xdd6080d77f5137d7(LOG_CODES code)
  {
    this._x9035cf16181332fc = code;
    this._x337e217cb3ba0627 = BOARDS.boardNULL;
    this._xa4aa8b4150b11435 = DeviceMode.None;
  }

  public int CompareTo(object obj)
  {
    x7ba9346687691c4e.x4e846d09fe48634b(obj is x39b8e005139a3d89.xdd6080d77f5137d7, "Wrong data type");
    x39b8e005139a3d89.xe657754b6d8c9c0b xe657754b6d8c9c0b = (x39b8e005139a3d89.xe657754b6d8c9c0b) obj;
    if (this.xdc1af3a17717bf0a > xe657754b6d8c9c0b.xdc1af3a17717bf0a)
      return 1;
    if (this.xdc1af3a17717bf0a < xe657754b6d8c9c0b.xdc1af3a17717bf0a)
      return -1;
    if (this.xaf77e81a71d6921f > xe657754b6d8c9c0b.xaf77e81a71d6921f)
      return 1;
    if (this.xaf77e81a71d6921f < xe657754b6d8c9c0b.xaf77e81a71d6921f)
      return -1;
    if (this.xad98d2ceb0921f0a > xe657754b6d8c9c0b.xad98d2ceb0921f0a)
      return 1;
    return this.xad98d2ceb0921f0a < xe657754b6d8c9c0b.xad98d2ceb0921f0a ? -1 : 0;
  }

  public IEnumerator<x39b8e005139a3d89.xe657754b6d8c9c0b> GetEnumerator()
  {
    throw new Exception("The method or operation is not implemented.");
  }

  IEnumerator IEnumerable.x05b0b83b5e6c5de6() // Also, I am getting Error at this Line. The error is: 'IEnumerable.x05b0b83b5e6c5de6' in explicit interface declaration is not a member of interface.
  {
    throw new Exception("The method or operation is not implemented.");
  }
}

請注意有2個錯誤(第一個錯誤在File x39b8e005139a3d89.cs ,其他錯誤在xdd6080d77f5137d7.cs文件的末尾。)

顯然,該名稱必須是IEnumerable.GetEnumerator而不是IEnumerable.x05b0b83b5e6c5de6

請參閱: IEnumerable接口

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM