using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloWorld
{
class App
{
//생성자
public App()
{
Func<string, Item>createItem = (name) => { return new Item(name); };
Item item = createItem("장검");
Console.WriteLine("=> {0}", item.name);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloWorld
{
class Item
{
public string name;
//생성자
public Item(string name)
{
this.name = name;
}
}
}