Results 1 to 5 of 5

Thread: [2.0] where to put?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2006
    Posts
    719

    [2.0] where to put?

    where should i put?

    using System.Data;
    using System.OleDb;

  2. #2
    Addicted Member effekt26's Avatar
    Join Date
    Nov 2006
    Posts
    138

    Re: [2.0] where to put?

    using statements must always go at the top of your file. before any class or namespace declarations...

    Code:
    using System;
    using System.Data;
    using System.OleDb;
    //etc.
    
    namespace MyNamespace {
    
        class MyClass {
    
        }
    
    }

  3. #3
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: [2.0] where to put?

    Actually you can place it inside a namespace. But practices are top most on every file as effekt26 said.

  4. #4
    Addicted Member effekt26's Avatar
    Join Date
    Nov 2006
    Posts
    138

    Re: [2.0] where to put?

    Quote Originally Posted by nebulom
    Actually you can place it inside a namespace. But practices are top most on every file as effekt26 said.
    Hmmm, I wasn't aware of that. Everything I have read said at the top, above classes...but mentioned nothing about namespaces...

    I'll keep that in mind.
    Thanks nebulom!

  5. #5
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: [2.0] where to put?

    In software programming it is good practice to follow a standard format. Normally those references are added top of the code, easy to find what type of application is there.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width