473,397 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to set an common namespace directives in C# 1.1

Hi,

Can anybody tell me how add an common namespace at project level or solution level in C#. Like in VB.Net, on Projetc property, there is tab know as imports, which specifies all the common impost through out the vb.net project. How can we do the same in C# and ASP.Net 2003

Pls Reply
Jan 10 '07 #1
3 1280
shweta123
692 Expert 512MB
Hi,

Even I am missing Import references tab both in 2003 and 2005 though its there for VB. surprising!!

Shweta
Jan 10 '07 #2
Hi,

Even I am missing Import references tab both in 2003 and 2005 though its there for VB. surprising!!

Shweta
Hey

When u right click on you VB.Net project properties pages, there is common Properties. there is Imports Property page
Jan 19 '07 #3
Motoma
3,237 Expert 2GB
In each of your source files, declare your classes inside a namespace declaration:

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections;
  3. using System.Data;
  4. using myproj;
  5.  
  6. namespace myproj
  7. {
  8.   public class myclass
  9.   {
  10.   .
  11.   .
  12.   .
  13. }
  14.  
Please note, in this example the 'using' fields, other than 'myproj' are not required to utilize namespaces in C#, I included them only to show you where the namespace would be used.

Hope this helps,
Motoma
Jan 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: beliavsky | last post by:
Many of my C++ programs have the line using namespace std; but the "Accelerated C++" book of Koenig and Moo has many examples where the library names are included one at a time, for example ...
30
by: Pep | last post by:
Is it best to include the code "using namespace std;" in the source or should each keyword in the std namespace be qualified by the namespace tag, such as std::cout << "using std namespace" <<...
13
by: toton | last post by:
Hi, I have some enum (enumeration ) defined in some namespace, not inside class. How to use the enum constant's in some other namespace without using the whole namespace. To say in little...
7
by: patrick | last post by:
Why do some code listings for learning C++ have the entire namespace std being used while others just specify the parts they want to use?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.