问题
Is there any way in which it can be seen the type of the parent activity of a NativeActivity from the Execute method ?
回答1:
Yes, you can execute the following code block and it will return you the value of the internal Parent
property -- this will be the instance of your parent.
this.GetType()
.GetProperty(
"Parent",
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)
.GetValue(this, null)
来源:https://stackoverflow.com/questions/5882680/parent-activity-type-for-nativeactivity-activities