Doubt about Messagebox

0

I have a question about our famous MessageBox.Show(); , this command is about an event, method what would it be?

Another question is about instantiating object, in the example below we are getting our login form and creating a variable that will be our object reference = receive object frmLogin .

My question is, can I say that my object would be frmLogin or entra

frmLogin entra = new frmLogin()

entra.show();
    
asked by anonymous 29.04.2018 / 05:04

1 answer

2
  
  • MessageBox is a public class of namespace System.Windows.Forms{} ;
  •   
  • The .Show() is a static method of the'MessageBox 'class that has the return type a'DialogResult';
  •   

You can view this information in the Metadata in the Visual Studio IDE by selecting the method or class name and pressing the F12 (Ir para definições) key:

MoreAboutMessageBox: Class

  

In case:

frmLogin entra = new frmLogin()
entra.Show();
     

entra is an object that refers to classe parcial frmLogin that   has as base a classe pública Form . In this situation the object will be   Instantiated, and then invoked Method .Show() that has   how to display the control ( Form ).

    
29.04.2018 / 06:54