// 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的治理支持和方便的使用方法后,基本就解决了我前面提到源代码复用里面版本控制和变量名修改的问题。