Can't find type xxx in scope

在程式中,常常會愈遇到 Can’t find type ‘XXX’ in scope 的錯誤,發生原因通常是

  • 拼字錯誤或大小寫不一致
  • 型態宣告不對
  • 未加入complie source中