Question

In Android when finished with an Activity and want to return to previous activity you use finish();.

Is there an equivalent in WinForms using C#? In my application once the user clicks the Enter button I want the user to return to previous window.

Was it helpful?

Solution

Base on a superficial understanding of an Activity in Android (sounds like a window element), you just need to call Close on the current window, then the previous one will then move to the foreground.

For future reference however, I would advise you not too create such analogies between two radically different technologies since the life cycle of an Activity in Android is radically different from a form in a Windows Form application. You should try to learn the framework rather than replicating an implementation from a different framework/platform.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top