Accessing public properties

Hi,

I am trying to acces to public properties of a component at run time, but not knowing anything about the class.

I know how to acces to the published properties (and it works, throug RTTI), but I don't find the way to the public ones.

I need to read and write public properties just having the object reference
cechetoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rwilson032697Commented:
Unfortunately you cannot do this without the RTTI (which only contains information on published properties).

One thing you could do is declare the common public properties (You can essentially vitualise them using virtual set and get methods) you need in an ancestor class of the classes you are using and then just reference them as normal.

Cheers,

Raymond.
0
cechetoAuthor Commented:
Sorry,

I know that you can ton access to throug RTTI

I need to solve it directly, It is not posible to access or modify the class or the ancestor.
0
cechetoAuthor Commented:
It is a general purpose access, with no need to know anything about the class.

The user must be able to select a property for reading and writing (It works with published)

Anyway if some one can asure that its not posible I will give the credits to rwilson, who first state it
0
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

garizpeCommented:
if you don´t know the name of the property you can´t do anything is the same with the methods

if you inherited the object may be you can access the property that you wish, or the method
0
rwilson032697Commented:
Hmm.. Try reading the comments grizpe!

Cheers,

Raymond.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cechetoAuthor Commented:
No "garizpe", with published properties I can get a list of them and access them without having to know the names, I am looking for a way of getting the list for the public ones.  Then the user can select the property and access to the data.

Thanks for your comment Raymond, you got the idea.
0
cechetoAuthor Commented:
Adjusted points to 70
0
cechetoAuthor Commented:
This is not the answer, the proposed answer was rejected because it said there was no solution.

But, as in more that twenty days no one else has found any solution, and as far I haven't found a way to do it either I accept rwilson answer (There is no way to do it) as the correct answer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.