我收到一条我似乎无法弄清楚的错误消息。我看到发布了许多其他类似的问题,但解决方案似乎对我不起作用。
错误信息:
'PaymentPlanStoreLogic.Class1.myLog' is a 'field' but is used like a 'type'
我的代码:
using System;
using PaymentPlanLogic;
namespace PaymentPlanStoreLogic
{
public class Class1
{
Logger myLog = new Logger();
myLog.createLog();
}
}
对象浏览器:
public void createLog()
Member of PaymentPlanLogic.Logger
我已经按照页面上的建议尝试了以下内容 (对象)是“字段”,但用作“类型”
PaymentPlanLogic.Logger.createLog();
但我得到了错误
"'PaymentPlanLogic.Logger.createLog()' is a 'method' but is used like a 'type'"