Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone!!

I want to return different values in a property,according to the method that reads it.

Thanks beforehead.
Posted
Comments
Richard MacCutchan 27-Sep-13 3:49am    
That's not the way to do it; you should use different properties.
V.Lorz 27-Sep-13 5:14am    
Just curious about it. Could you please tell us why do you need it?

1 solution

A bad idea like Richard said, but you can use the StackTrace see here : http://stackoverflow.com/questions/615940/retrieving-the-calling-method-name-from-within-a-method-c[^]
 
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