PDA

View Full Version : حرفه ای: تفاوت این دو حالت کدنویسی چیه؟



milad.biroonvand
پنج شنبه 26 شهریور 1394, 10:39 صبح
حالت اول استفاده از



private sub Namayeshpeygham()
msgbox("ok")
end sub
Namayeshpeygham()




حالت دوم استفاده از دلیگیت




Delegate Sub Namayeshpeyghamsafe()
dim msgdeleg as new Namayeshpeyghamafe( AddressOf Namayeshpeygham)
Me.Invoke(msgdeleg)



لطفا معایب و مزایای را بصورت خلاصه بنویسید؟