1

hi i have on object (serverconnection from sqlserver Managament object ) i need send this object to other form to configure connection option and connect so object return but when i send this object to form2 how return it or when i use form.ShowDialog() when this return or how return from this

skaffman
  • 398,947
  • 96
  • 818
  • 769
maysam
  • 41
  • 3

1 Answers1

1

You can introduce a property into your second form, e.g.:

if( form2.ShowDialog() == DialogResult.OK )
{
    var configuration = form2.Configuration;
}

here the property is called Configuration and holds the object you need.

tanascius
  • 53,078
  • 22
  • 114
  • 136