|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Why use Dim outside of sub?What is the difference in:
Public Class Form1 Inherits System.Windows.Forms.Form Dim myUrl As String and Private myUrl As String In other words, using Dim or Private outside of a sub. Both can be seen within any sub in that class.. Private seems more explicit. I'm also assuming that Dim keeps the variable scoped only within that class, just like Private. Thanks, Brett I'm pretty sure there is no difference and they just allow either. Both
would be module level scoped variables and private. HTH, Shane Show quoteHide quote "Brett" <no@spam.com> wrote in message news:umXDNCqPFHA.1268@TK2MSFTNGP14.phx.gbl... > What is the difference in: > > Public Class Form1 > Inherits System.Windows.Forms.Form > Dim myUrl As String > > and > Private myUrl As String > > In other words, using Dim or Private outside of a sub. Both can be seen > within any sub in that class.. Private seems more explicit. I'm also > assuming that Dim keeps the variable scoped only within that class, just > like Private. > > Thanks, > Brett > Brett,
> Public Class Form1 A mather of personal preference they are in this case both private inside > Inherits System.Windows.Forms.Form > Dim myUrl As String > > and > Private myUrl As String the class Cor
Dragging a mail from Outlook/Outlook Express in to a .NET VB app
DataGrid Bind to DataSet, then Bind to DaTaview, GOT ERROR...PLS HELP File pointer to be positioned at the last occurance of a keyword Lines and Boxes in VB.Net Newbie VB Question MDIChild form controls: how to pass information between them? Connectionstring Unexpected behaviour of MyClass (please ignore 1st post) Copy Directry including across the Volumes. Screen Resolution |
|||||||||||||||||||||||