IKVM.Reflection.Type.GetProperty C# (CSharp) Метод

GetProperty() публичный Метод

public GetProperty ( string name ) : IKVM.Reflection.PropertyInfo
name string
Результат IKVM.Reflection.PropertyInfo
        public PropertyInfo GetProperty(string name)
        {
            return GetProperty(name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
        }

Same methods

Type::GetProperty ( string name, BindingFlags bindingAttr ) : IKVM.Reflection.PropertyInfo
Type::GetProperty ( string name, BindingFlags bindingAttr, IKVM.Reflection.Binder binder, Type returnType, Type types, IKVM.Reflection.ParameterModifier modifiers ) : IKVM.Reflection.PropertyInfo
Type::GetProperty ( string name, Type returnType ) : IKVM.Reflection.PropertyInfo
Type::GetProperty ( string name, Type returnType, Type types ) : IKVM.Reflection.PropertyInfo
Type::GetProperty ( string name, Type returnType, Type types, IKVM.Reflection.ParameterModifier modifiers ) : IKVM.Reflection.PropertyInfo

Usage Example

        bool AddDateTimeSupport(Type t)
        {
            if (system_datetime != null)
            {
                return(true);
            }

            var corlib = GetMscorlib(t);

            system_datetime = new ProcessedType(t)
            {
                Assembly = corlib,
                // this is tracked because the linker (if enabled) needs to be aware of the requirement
                // but we do not want any code to be generated (it's referenced only from native/glue code)
                IsNativeReference = true,
                Methods           = new List <ProcessedMethod> (),
                Properties        = new List <ProcessedProperty> (),
                Constructors      = new List <ProcessedConstructor> (),
            };
            var ticks = t.GetProperty("Ticks");

            system_datetime.Properties.Add(new ProcessedProperty(ticks, this, system_datetime));

            var kind = t.GetProperty("Kind");

            system_datetime.Properties.Add(new ProcessedProperty(kind, this, system_datetime));

            var dtk          = corlib.Assembly.GetType("System.DateTimeKind");
            var longT        = corlib.Assembly.GetType("System.Int64");
            var ctorLongKind = t.GetConstructor(new Type [] { longT, dtk });

            system_datetime.Constructors.Add(new ProcessedConstructor(ctorLongKind, this, system_datetime));

            var toUniversalTime = t.GetMethod("ToUniversalTime");

            system_datetime.Methods.Add(new ProcessedMethod(toUniversalTime, this, system_datetime));

            AddExtraType(system_datetime);
            return(true);
        }
All Usage Examples Of IKVM.Reflection.Type::GetProperty