.我對編程很陌生,我想我正在失去理智,試圖了解這里的問題是什么。有沒有人有什么建議?
測驗專案的參考設定為 OrderManagementSystem.Domain 和 OrderManagementSystem.Controllers。控制器類是 Public 。我可以從域名空間訪問類,但不能訪問控制器??我做錯了什么?

uj5u.com熱心網友回復:
這個錯誤是因為你的類名是Controllers并且命名空間也包含.Controllers.
更新類的名稱或.Controllers從命名空間中洗掉OrderManagementSystem.Controllers
在 Controllers.cs 檔案中,
using Systems;
....
//Remove .Controllers from namespace
namespace OrderManagementSystems
{
public class Controllers
{
//Your code
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/359748.html
