|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Call or Not CallIs there a difference between using Call ProcName vs just using ProcName?
If not, is it considered proper to use Call when calling another proc? Thanks. "Jay" <some***@somewhere.com> schrieb: No.> Is there a difference between using Call ProcName vs just using ProcName? > If not, is it considered proper to use Call when calling another proc? In VB6 I always used 'Call', but in VB I omit it except in one scenario where it is mandatory: \\\ Call (New MainForm()).Show() /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> > where it is mandatory: Why is it mandatory here? What happens to the instance when the call drops > > \\\ > Call (New MainForm()).Show() > /// > out of scope? (just curious ;). "Robinson" <toomuchspamhaspassed@myinboxtoomuchtoooften.com> schrieb: It stays alive because somewhere in the Windows Forms library a reference to >> where it is mandatory: >> >> \\\ >> Call (New MainForm()).Show() >> /// >> > > Why is it mandatory here? What happens to the instance when the call > drops out of scope? (just curious ;). the form prevents the form from being released. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Jay wrote:
> Is there a difference between using Call ProcName vs just using (Double-check newsgroup ... dotnet ... OK)> ProcName? No difference at all. > is it considered proper to use Call when calling another proc? I'd say "Ditch it"; it's just eye candy now.If you're still looking after VB "Proper" code, though, I would strongly recommend using Call there; it gets your code into better shape for when you need to migrate it to the newer "versions" of Visual Basic. HTH, Phill W.
IN Function ?
Visual Basic to be discontinued in 2008?? Recommendations - VB .Net courses/seminars 2 dimensional array question programmatically allow tcp/ip to msde Radio buttons - best practice "Attempted to read or write protected memory" since 10 days... ADO.NET Rowfilter - between 2 dates Install errors during a Fix install Automatically inserting method & function headers from an interface that are being implemented with |
|||||||||||||||||||||||