예제 #1
0
        public DVar GetField(string fieldName)
        {
            int fieldIndex = DType.IndexOf(fieldName);

            if (fieldIndex != DType.InvalidIndex)
            {
                return(Fields[fieldIndex]);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        public int GetOrAddFieldIndex(string fieldName)
        {
            int fieldIndex = DType.IndexOf(fieldName);

            if (fieldIndex == DType.InvalidIndex)
            {
                SetType(new DType(fieldName, DType));
                fieldIndex = DType.FieldIndex;
            }
            if (Fields[fieldIndex] == null)
            {
                Fields[fieldIndex] = new DVar();
            }
            return(fieldIndex);
        }