Click here to Skip to main content
16,020,343 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to access Non-Public member of Gridview in asp.net?
Please Help
Posted
Comments
JoCodes 17-Sep-13 10:35am    
What exactly you want to access . Please explain in more detail

1 solution

You can access any members, public and non-public using reflection. If you need it, read on reflection. This is easy. Please start here:
http://msdn.microsoft.com/en-us/library/system.reflection.aspx[^].

However, something tells me that you don't really need it. If you needed reflection, you would not ask about a concrete GridView type you mentioned. You just cannot reach some feature and mean to abuse the class. Access specifiers are written on purpose. Find the legitimate ways of using library components, learn them.

Too bad you did not explain the purpose of the access you wanted. If you did, you would get some more useful advice. But at that time, you certainly need to improve your thinking. One of the typical ridiculous question types on this forum is: "Compiler (exception) tells me: 'you cannot do X'. My question is: how to do X?" :-).

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900