using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ADDLOG
{
public class Addlog
{
private string time;
private string username;
private string details;
// private string path;
private bool exists;
public Addlog(string time, string username, string details)
{
this.time = time;
this.username = username;
this.details = details;
}
string path = "F://" + time + username;
}
class Program
{
static void Main(string[] args)
{
}
}
}
错误提示:错误1字段初始值设定项无法引用非静态字段、方法或属性“ADDLOG.Addlog.time”D:/project/ADDLOG/ADDLOG/Program.cs2533ADDLOG