Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

Reference in C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Irfan - 16 Oct 2006 12:59 GMT
hi,
C Sharp how to add references so that they are accessible to all the files
in that project. Everytime a create a new file,
i have to copy all the 'Using' Statement to that new file. In VB.net we do
it by going to the Project Properties and the referaces are declared
globally. How can it be done in C#

TIA
Irfan
Kevin Spencer - 16 Oct 2006 13:56 GMT
Referenced assemblies are available to all files in a project. A using
statment merely enables you to refer to a class in an assembly without
typing the full namespace.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Shooter
http://unclechutney.blogspot.com

A man, a plan, a canal, a palindrome that has.. oh, never mind.

> hi,
> C Sharp how to add references so that they are accessible to all the files
[quoted text clipped - 5 lines]
> TIA
> Irfan
Irfan - 16 Oct 2006 14:20 GMT
Thanks Kevin,
Actually I  meant the referencing of the individual classes in the
namespace.

If i have referanced  Namespaces "MyLibrary" and i want to use
MyLibrary.CircleLib in every file in my project. How do  i
do it. Do i have to use 'Using MyLibrary.CircleLib' in every file?

In VB i would have just gone to the project properties and added
MyLibrary.CircleLib, which would have set it globally.
I was expected a similar thing in C#? Is it not possible?

Thanks,
Irfan

> Referenced assemblies are available to all files in a project. A using
> statment merely enables you to refer to a class in an assembly without
[quoted text clipped - 9 lines]
>> TIA
>> Irfan
Kevin Spencer - 16 Oct 2006 18:41 GMT
That was because you were referencing a module. While creating modules is
possible in C#, it's not easily done, and that's because it's not a good
idea.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Shooter
http://unclechutney.blogspot.com

A man, a plan, a canal, a palindrome that has.. oh, never mind.

> Thanks Kevin,
> Actually I  meant the referencing of the individual classes in the
[quoted text clipped - 24 lines]
>>> TIA
>>> Irfan
Carl Daniel [VC++ MVP] - 16 Oct 2006 19:34 GMT
> Thanks Kevin,
> Actually I  meant the referencing of the individual classes in the
[quoted text clipped - 7 lines]
> MyLibrary.CircleLib, which would have set it globally.
> I was expected a similar thing in C#? Is it not possible?

There's no such facility in any .NET language except VB, as far as I know.

-cd
VICKY - 16 Oct 2006 22:58 GMT
Irfan - 17 Oct 2006 14:04 GMT
thanks for all your replies which cleared my doubt.

irfan

>> Thanks Kevin,
>> Actually I  meant the referencing of the individual classes in the
[quoted text clipped - 11 lines]
>
> -cd

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.