您可以像这样填充# never used Enumerator::Generator directly,but you called it out specifically
# in your question,and this seems to be doing the trick to get it working
enum = Enumerator::Generator.new do |y|
y.yield "ant"
y.yield "bear"
y.yield "cat"
end
p enum.reduce(&:+) # output: "antbearcat"
# crude example of modifying the strings as you join them
p enum.reduce('') { |memo,word| memo += word.upcase + ' ' }
# output: "ANT BEAR CAT "
而不是 String id = exchange.getRequest().getId();
exchange.getResponse().getHeaders().add("id",id);
SelectListItem
您的视图SelectList
这样
List<SelectListItem> projectTableList = new List<SelectListItem>();
foreach (var projectTable in db.Projects_Table)
{
projectTableList.Add(new SelectListItem
{
Text=projectTable.Code,Value=projectTable.ID.ToString()
});
}
ViewBag.list = projectTableList;
return View();
本文链接:https://www.f2er.com/3166107.html