문제

Is it possible to define a new class within a t4 template?

I tried this but it gave me an error 'A template containing a class feature must end with a class feature'

<#+
    public class AppSettingDefinition
    {
        private string _dataType;
        public string DataType
        {
            get { return _dataType; }
            set { _dataType = value; }
        }
    }
#>
도움이 되었습니까?

해결책

Yes this is possible, the error I received was because I had text after class feature closing tag #>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top