G
Guest
Hi- I'm new to .Net, a Delphi developer learning C#. What is the scope of
the using statement, or maybe a better question is how do I use it? From the
help, it looks like the scope is within a namespace.
What I have is a class library with several files. One file is a base
class, and then the other 3 files each contain a class that is derived from
the base class. Each class is in its own file, and all classes belong to the
same namespace. I've added references to the base class file:
using BTSComponentsLib;
using System.EnterpriseServices;
using System.Runtime.InteropServices;
using AspenCOM; //In-house unmanaged dll
Since all my classes belong to the same namespace, I am thinking I won't
need to add the using statements to all the files, just the base class file.
Is this reasoning accurate?
thanks,
Jan
the using statement, or maybe a better question is how do I use it? From the
help, it looks like the scope is within a namespace.
What I have is a class library with several files. One file is a base
class, and then the other 3 files each contain a class that is derived from
the base class. Each class is in its own file, and all classes belong to the
same namespace. I've added references to the base class file:
using BTSComponentsLib;
using System.EnterpriseServices;
using System.Runtime.InteropServices;
using AspenCOM; //In-house unmanaged dll
Since all my classes belong to the same namespace, I am thinking I won't
need to add the using statements to all the files, just the base class file.
Is this reasoning accurate?
thanks,
Jan