<span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">Undo, Redo 기능을 다시 만들고 있습니다.</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">람다 식 안에서는 ref를 못 쓴다거나 제네릭을 쓰면 포인터를 못 쓴다는것 등등 귀찮은 제약이 많아 깔끔하게 만들기가 힘드네요..</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">public class AutoWrite<T></span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">{</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> T value,</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> memory;</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> public AutoWrite(T ivalue)</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> {</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> value = ivalue;</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> memory = ivalue;</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> public T Get()</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> {</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> return value;</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> public void Set(MyClass iowner, T ivalue, string name)</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> {</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> if (예외처리)</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> {</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> memory = value;</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> value = ivalue;</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> return;</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> //Undo, Redo 입력중-</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">}</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">public class STAGE_INFO : MyClass</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">{</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> AutoWrite<int> _nLevel = new AutoWrite<int>(1);</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> //AutoWrite<int> _nLevel = 1; 이렇게 초기화할 수 있도록 만들어주는 방법?</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> public int nLevel</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> {</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> get { return _nLevel.Get(); }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> set { _nLevel.Set(this, value, "Set Level"); }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">}</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">만약 저 클래스를 쓰지 않는다면</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">public class MyClass</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">{</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> //~~~</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> public void SetValue<T>(Action<T> action, T value, T memoryR, string name)</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> {</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> //예외처리, Undo, Redo 기록-</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> //~~~</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">}</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">public class STAGE_INFO : MyClass</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">{</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> int _nLevel = 1;</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> public int nLevel</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> {</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> get { return _Enter_level; }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> set { SetValue((a) => _Enter_level = a, value, _Enter_level, "Set Enter_level"); }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px"> }</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">}</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">이런식으로 매번 람다식을 적어줘야 되는데, 역시 겉보기에도 좀 이상하고 계속 적기도 귀찮아서 첫 번째 방법을 사용하려고 합니다.</span><br style="margin: 0px; padding: 0px; border: 0px; color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px" /><span style="color: #333333; font-family: dotum, 돋움, gulim, 굴림, Helvetica, Apple-Gothic, sans-serif; line-height: 21.600000381469727px">주석부분(AutoWrite<int> _nLevel = 1;)처럼 제네릭으로 int를 받을 경우 int값으로 초기화할 수 있는 방법은 없을까요? </span>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.