Click here to Skip to main content
15,910,471 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I save the call stack of a StackOverflowException? Pin
Robert Royall5-Dec-07 10:50
Robert Royall5-Dec-07 10:50 
GeneralRe: How can I save the call stack of a StackOverflowException? Pin
Dr. Spack5-Dec-07 23:30
Dr. Spack5-Dec-07 23:30 
Generalnavigating all nodes in a win forms treeview Pin
radi85-Dec-07 8:38
radi85-Dec-07 8:38 
GeneralRe: navigating all nodes in a win forms treeview Pin
Giorgi Dalakishvili5-Dec-07 8:53
mentorGiorgi Dalakishvili5-Dec-07 8:53 
GeneralRe: navigating all nodes in a win forms treeview Pin
radi85-Dec-07 8:55
radi85-Dec-07 8:55 
GeneralRe: navigating all nodes in a win forms treeview Pin
Pete O'Hanlon5-Dec-07 9:19
mvePete O'Hanlon5-Dec-07 9:19 
GeneralRe: navigating all nodes in a win forms treeview Pin
radi86-Dec-07 6:10
radi86-Dec-07 6:10 
QuestionFind name of declaring property of an object Pin
Joby15-Dec-07 8:37
Joby15-Dec-07 8:37 
Is it possible to find the name of the property for which an instance of an object is assigned to? ie: From inside an instance of an object that is assigned to a property of another object, I want to know the name of the property that that object is assigned to?

For example, you have a "Person" class that has a "MailingAddress" property and a "ShippingAddress" property, with each of these containing a general "Address" class object. From inside the instance of the "Address" object that is assigned to the "ShippingAddress" property, how do I find that this instance is assigned to the "ShippingAddress" property or the "MailingAddress" property? Or more generally, how do I find the name of the property for which an instance of an object is assigned to?

I would like to be able to do this without having a reference to the parent "Person" object; just determine the declaring property's name from any instance of an object.

Ultimately, I would like to define a string that contains the "path" down through an object hierarchy from property to property. For example, create a path string such as: "Person.ShippingAddress.ZipCode", which can be parsed later to in order to set the "ZipCode" property to a specific value for a Person. This example is somewhat trivial, but I need to be able to create this "path" for any object in order to set that object's property values for testing purposes. ie: Given that I know I will start with some parent object (in this case a Person object), I want to parse the path string so I can drill down through the Person class in order to set certain property values and then test the reaction of the program to those newly set values. Having the path string allows me to automate this testing process.

Reflection seems to work well when you want to drill DOWN into a class, but how to you start with an instance of an object and work your way back UP?

Thankyou for your time. Joby
GeneralRe: Find name of declaring property of an object Pin
Christian Graus5-Dec-07 9:16
protectorChristian Graus5-Dec-07 9:16 
GeneralRe: Find name of declaring property of an object Pin
Pete O'Hanlon5-Dec-07 9:20
mvePete O'Hanlon5-Dec-07 9:20 
GeneralWanted to built my own ACD (Auto Call Distribution) Pin
Muhammad Nauman Yousuf5-Dec-07 7:16
Muhammad Nauman Yousuf5-Dec-07 7:16 
GeneralIO performance in c# Pin
poqeqw5-Dec-07 7:01
poqeqw5-Dec-07 7:01 
GeneralRe: IO performance in c# Pin
Ennis Ray Lynch, Jr.5-Dec-07 10:01
Ennis Ray Lynch, Jr.5-Dec-07 10:01 
QuestionAre there in-depth samples for WorkFlow Foundation DependencyProperty ? Pin
vgrigor15-Dec-07 5:27
vgrigor15-Dec-07 5:27 
Questionwebbrowser component and web application using java Pin
JackD5-Dec-07 5:15
JackD5-Dec-07 5:15 
Generalconnection error Pin
arkiboys5-Dec-07 4:59
arkiboys5-Dec-07 4:59 
GeneralRe: connection error Pin
Dave Kreskowiak5-Dec-07 5:43
mveDave Kreskowiak5-Dec-07 5:43 
QuestionPassing value types async Pin
Andre Azevedo5-Dec-07 4:15
Andre Azevedo5-Dec-07 4:15 
GeneralRe: Passing value types async Pin
led mike5-Dec-07 5:17
led mike5-Dec-07 5:17 
GeneralRe: Passing value types async [modified] Pin
Andre Azevedo5-Dec-07 6:37
Andre Azevedo5-Dec-07 6:37 
GeneralMarshalling unmanaged DLL Pin
Dio225-Dec-07 4:05
Dio225-Dec-07 4:05 
GeneralRe: Marshalling unmanaged DLL Pin
Pete O'Hanlon5-Dec-07 4:08
mvePete O'Hanlon5-Dec-07 4:08 
GeneralRe: Marshalling unmanaged DLL Pin
m@u5-Dec-07 4:50
m@u5-Dec-07 4:50 
GeneralRe: Marshalling unmanaged DLL Pin
Dio225-Dec-07 5:42
Dio225-Dec-07 5:42 
GeneralRe: Marshalling unmanaged DLL Pin
Andre Azevedo5-Dec-07 6:44
Andre Azevedo5-Dec-07 6:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.