473,325 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

a reflection question

Hi.

How to get protected fields of base class using reflection?

Thanks.
Nov 16 '05 #1
3 1366
The docs for the FieldInfo class come with a sample that can get you
started:
http://msdn.microsoft.com/library/de...classtopic.asp

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 1 Nov 2004 04:53:30 +0200, "That Guy" <na*@endeavourteam.com>
wrote:
Hi.

How to get protected fields of base class using reflection?

Thanks.


Nov 16 '05 #2
Hello, Scott!

Are you sure i can extract PROTECTED fields?

SA> The docs for the FieldInfo class come with a sample that can get you
SA> started:
SA> http://msdn.microsoft.com/library/de...classtopic.asp

SA> --
SA> Scott
SA> http://www.OdeToCode.com/blogs/scott/

SA> On Mon, 1 Nov 2004 04:53:30 +0200, "That Guy" <na*@endeavourteam.com>
SA> wrote:

??>> Hi.
??>>
??>> How to get protected fields of base class using reflection?
??>>
??>> Thanks.
Nov 16 '05 #3
Yes, protected and private fields. Code access security can restrict a
partially trusted application from using reflection, but if you are
running a local application with full trust, it will be able to
reflect over anything.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 4 Nov 2004 10:20:44 +0200, "That Guy" <na*@endeavourteam.com>
wrote:
Hello, Scott!

Are you sure i can extract PROTECTED fields?

SA> The docs for the FieldInfo class come with a sample that can get you
SA> started:
SA> http://msdn.microsoft.com/library/de...classtopic.asp

SA> --
SA> Scott
SA> http://www.OdeToCode.com/blogs/scott/

SA> On Mon, 1 Nov 2004 04:53:30 +0200, "That Guy" <na*@endeavourteam.com>
SA> wrote:

??>> Hi.
??>>
??>> How to get protected fields of base class using reflection?
??>>
??>> Thanks.


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: A. Wiebenga | last post by:
Hi all! I am a student at the Hogeschool van Arnhem en Nijmegen in Holland. I am currently involved in a research project regarding Reflection. Purpose of the research project is to document...
10
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
1
by: Mike Malter | last post by:
I am just starting to work with reflection and I want to create a log that saves relevant information if a method call fails so I can call that method again later using reflection. I am...
2
by: Dan | last post by:
Let's say I have a class like: class Dummy { public const string CONE = "one"; public const string CTWO = "two"; ... other stuff .... }
7
by: John | last post by:
I have a class the reads in a file and sets the values of the file into its properties. This class is used to populate the data onto a form. This form has controls created at runtime based on...
1
by: Pieter Breed | last post by:
Hi All, I am trying to use the attribute/reflection system to as much potential as I can think of, but I've run into a snag. I would appreciate it if someone would point me in the right...
5
by: heddy | last post by:
I understand that reflection allows me to discover the metadata of a class at runtime (properties, methods etc). What I don't understand is where this is useful. For example: If I am the sole...
5
by: =?Utf-8?B?Q2hyaXN0aWFuIEhhdmVs?= | last post by:
Hi, is it faster to access the fields from an object directly by using reflection than accessing them by their properties using reflection? Thanks Christian
17
by: raylopez99 | last post by:
What good is C# Reflection, other than to find out what types are in an assembly? And to dynamically invoke methods in an assembly (.dll or .exe)? Also, bonus question, can you use Reflection...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.