【发布时间】:2009-10-21 17:52:37
【问题描述】:
以下代码有效,但我无法弄清楚内存方面发生了什么。 struct 值t 复制到哪里以及如何复制?
interface ITest { void Hello(); }
struct STest : ITest
{
public void Hello() { Console.WriteLine("Hello"); }
}
static ITest Make()
{
STest t = new STest();
return t;
}
static void Main(string[] args)
{
ITest it = Make();
it.Hello();
}
【问题讨论】: