// A Length property isn't required, but it's often useful. public int Length { get { return 1; } }
public $type$ this[int index] { get { // // TODO: implement indexer here // // you have full access to $outer$ privates. // $end$throw new System.NotImplementedException(); return default($type$); } }
public $SystemCollectionsGenericIEnumeratorG$<$type$> GetEnumerator() { // TODO: provide an appropriate implementation here for (int i = 0; i < this.Length; i++) { yield return this[i]; } } }]]> </Code> </Snippet> </CodeSnippet> 有了這個snippet的治理支持和方便的使用方法后,基本就解決了我前面提到源代碼復用里面版本控制和變量名修改的問題。