【发布时间】:2012-12-28 01:03:43
【问题描述】:
我需要类似的东西
public class object_t
{
public object_t ( string config, object_t default_obj )
{
if( /*failed to initialize from config*/ )
{
this = default_obj; // need to copy default object into self
}
}
}
我知道这是不正确的。如何实现这个构造函数?
【问题讨论】:
-
我已经编辑了你的标题。请参阅“Should questions include “tags” in their titles?”,其中的共识是“不,他们不应该”。
标签: c#