Excellent answers. Thank you, David.

On Apr 7, 6:54 am, David Rutten <[email protected]> wrote:
> Ah ok. The file format is pretty flexible. IF you want to use Option
> Explicit or Option Strict (or any other option) they must be at the
> top. IF you want to use Imports statements, they must be directly
> underneath. Then, you can pretty much do whatever you want. You can
> use a Namespace, or multiple Namespaces. You can define classes,
> structures, modules, enums, interfaces and variables. You can split
> the contents of a single class across multiple files, but not across
> multiple namespaces. Classes can contain other classes, structures,
> enums... etc. etc. ad infinitum.
>
> --
> David Rutten
> [email protected]
> Robert McNeel & Associates
>
> On Apr 7, 6:27 am, CMRHM <[email protected]> wrote:
>
> > Sorry. I didn't explain it clearly. I didn't mean to run this code.
>
> > What I did is trying to understand the basic file structure of
> > VB.NET.  When I search the tutorial or internet, I found it is very
> > hard to find a complete version of basic file showing the typical
> > elements in a VB code.
> > Instead, if i want to find same thing for Java, or C++, I can find it
> > easily.
>
> > One word: all I want is a sample code to show me how this VB.NET code
> > look like.
>
> > On Apr 6, 11:46 am, David Rutten <[email protected]> wrote:
>
> > > It's just that you included an incomplete Imports section which are
> > > automatically added (and cannot be altered).
>
> > > Also, I'm wondering why you need a special Namespace in your Script.
>
> > > Are you getting errors when you try and commit this code?
>
> > > --
> > > David Rutten
> > > [email protected]
> > > Robert McNeel & Associates
>
> > > On Apr 6, 6:42 pm, CMRHM <[email protected]> wrote:
>
> > > > David:
>
> > > > Inside the script Editor of GH.
>
> > > > Anything wrong?
>
> > > > Also, I guess we don't need Main() in VB.NET, do we?  Do you provide a
> > > > complete code file structure for the demo like including main(), sub()
> > > > and etc.?
>
> > > > On Apr 6, 6:06 am, David Rutten <[email protected]> wrote:
>
> > > > > CMRHM,
>
> > > > > it looks correct to me... where are you writing this?
>
> > > > > --
> > > > > David Rutten
> > > > > [email protected]
> > > > > Robert McNeel & Associates
>
> > > > > On Apr 6, 7:02 am, CMRHM <[email protected]> wrote:
>
> > > > > > I here write a VB.NET basic code file structure. If there is sth
> > > > > > incorrect, please point it out:
>
> > > > > > 'set a number of options to prevent syntax and logical errors
> > > > > > Option Explicit On
>
> > > > > > 'imports namespaces
> > > > > > Imports System.IO
>
> > > > > > 'main code
> > > > > > Namespace Hello
> > > > > >  Public Class Employee
> > > > > >  ...
> > > > > >  End Class
> > > > > > End Namespace

Reply via email to