|
-
Jun 27th, 2007, 11:41 PM
#1
Thread Starter
Fanatic Member
[2.0] where to put?
where should i put?
using System.Data;
using System.OleDb;
-
Jun 27th, 2007, 11:47 PM
#2
Addicted Member
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 {
}
}
-
Jul 4th, 2007, 07:31 PM
#3
Fanatic Member
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.
-
Jul 4th, 2007, 07:56 PM
#4
Addicted Member
Re: [2.0] where to put?
 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!
-
Jul 4th, 2007, 09:44 PM
#5
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|