我创建了一个这样的类:
namespace Web.Models
{
public class TimeLineStep
{
public string Code { get; set; }
public string Title;
public string Description;
public string Url;
public string Status;
public string Category;
}
}
我在这样的模型中使用这个类:
namespace Web.Models
{
public class TimelineList
{
private List<TimelineStep> _steps;
public List<TimelineStep> Steps
{
get
{
return this._steps ?? (this._steps = new List<TimelineStep>());
}
set
{
this._steps = value;
}
}
两者都在相同的命名空间下,但是TimeLineStep类用红色加下划线,表示无法解析符号'TimeLineStep'