共用方式為


編譯器警告 (層級 3) CS0169

更新:2007 年 11 月

錯誤訊息

私用欄位 'class member' 從未使用

已宣告 private 變數,但從未被參考到。會產生這種警告通常是因為您宣告類別的私用成員但沒有使用它。

下列範例會產生 CS0169:

// compile with: /W:3
using System;
public class ClassX
{
   int i;   // CS0169, i is not used anywhere

   public static void Main()
   {
   }
}