Lionel,
When you add a reference, it makes your assembly aware of the types in
that reference. When you use the "using" statement at the top of a code
file, it allows you to declare type names without using the full type name.
So, you could do something like:
using System.Text;
StringBuilder builder = new StringBuilder();
As opposed to having to do this (without the using statement):
System.Text.StringBuilder builder = new System.Text.StringBuilder();
If you are using a text editor to develop your code, then you have to
specify the references through the compiler, using the /reference option.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Lionel" <Li****@discussions.microsoft.com> wrote in message
news:9E**********************************@microsof t.com...
Hello all,
two quick questions:
One: What is the difference between adding a reference to something in my
C#
project so I can use it (for example, adding a reference to
"Microsft.DirectX" when you need to access DirectX functionality in your
program) and the "using ..." directive?
Two: I've only seen (in books) how to add references to C# projects via
the
dropdown menus of the VS.Net 2003 IDE...how do I add references to my C#
app
if I'm just using the (free downloadable) .NET SDK and a simple text
editor?
Thanks in advance, everyone!