我想在函数完成后处理实例。我认为带有“使用”的东西...
我还想将每个名称添加到数组中。
我尝试:
using( Database db = new Database())
public string[] FindNameByLength(int minimumCharNumber)
{
try{
var query = from u in db.Users
where u.FullName.Length > minimumCharNumber
select u.FullName;
string[] namesLength;
int counter;
foreach (var s in query)
{
namesLength.Concat(new[] {s });
}
return namesLength;
}
finally IDisposable(db).dispose();
}
}