【发布时间】:2022-01-07 15:21:23
【问题描述】:
我需要从一个函数返回多个项目。我该怎么做?
public List<string> GetInfo()
{
var result = new List<string>();
return result;
}
我怎样才能退回这样的东西?基本上是字符串列表,也可能是泛型类型列表。
public List<string> GetInfo()
{
var result = new List<string>();
return result and someType;
}
public class someType
{
public List<SomeOthertype> someOthertype { get; set; }
}
【问题讨论】:
标签: c# asp.net-mvc