开发者

when dialog result for form get return

开发者 https://www.devze.com 2023-01-07 06:33 出处:网络
hi i have on object (serverconnection from sqlserver Managament object ) i need send this object to other form to configure connection option andconnect so object returnbut when i send this object t开

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 t开发者_JAVA百科o form2 how return it or when i use form.ShowDialog() when this return or how return from this


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消