Re: #include
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 03/25/04
- Next message: Morten Wennevik: "Re: Preventing user interaction with operating system(windows 2000) or any window on the desktop while showing a "wait" cursor"
- Previous message: Bruno Jouhier [MVP]: "Re: Cost of **is** and **as** or **(type)**"
- In reply to: Matt Wisner: "#include"
- Next in thread: Mike Kitchen: "Re: #include"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Mar 2004 07:47:08 -0000
Matt Wisner <mwisner69@comcast.net> wrote:
> I'm new to C# and was wondering what the best practice is for including text
> in source files. Specifically, I have 2 "using x = y;" statements hard-coded
> at the top of all my (13) source files. What is/are the Visual Studio/C#
> Best-Practices for this scenario?
Just include those using statements you need at the top of each file,
and grin and bear it. Don't forget that even if you had include files,
you'd only go down from 2 lines to 1.
As a sidenote, I'd personally recommend just "using Foo;" statements
rather than "using Foo=Bar;" for the sake of readability.
> Is there a C# equivalent to the C/C++ #include directive?
No.
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Morten Wennevik: "Re: Preventing user interaction with operating system(windows 2000) or any window on the desktop while showing a "wait" cursor"
- Previous message: Bruno Jouhier [MVP]: "Re: Cost of **is** and **as** or **(type)**"
- In reply to: Matt Wisner: "#include"
- Next in thread: Mike Kitchen: "Re: #include"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|