Note that in the code I have the following as well:
Form1 - This is a windows Form
cmbWebApp - This is a combo box control for choosing the web app
btn1 - Button that is clicked to start the process
textBox1 - This is a textbox that is used to display the list of users
Also note that the code will call out any areas where permissions inheritance has been broken and will also iterate and list all users inside of sharepoint groups for you as well.