System.ComponentModel.TypeListConverter.GetStandardValues C# (CSharp) 메소드

GetStandardValues() 공개 메소드

Gets a collection of standard values for the data type this validator is designed for.

public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext
리턴 StandardValuesCollection
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            if (_values == null)
            {
                object[] objTypes;

                if (_types != null)
                {
                    objTypes = new object[_types.Length];
                    Array.Copy(_types, objTypes, _types.Length);
                }
                else
                {
                    objTypes = null;
                }

                _values = new StandardValuesCollection(objTypes);
            }
            return _values;
        }