473,385 Members | 1,470 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,385 software developers and data experts.

Global Using ?

I am wondering how to assign a friendly name for an imported [using]
assembly. I understand the following:
using FriendlyName = CompanyName.AnotherName.UnfreindlyName.More;

How can I get this definition throughout a current namespace. [Ive found
myself having to define it in every file. I tried putting:

using FriendlyName = ReallyUnfriendlyName;

in the AssemblyInfo.cs file...but that does not seem to work.

Thanks for any advice.

Nov 17 '05 #1
4 1550
katzky <ka****@discussions.microsoft.com> wrote:
I am wondering how to assign a friendly name for an imported [using]
assembly. I understand the following:

using FriendlyName = CompanyName.AnotherName.UnfreindlyName.More;

How can I get this definition throughout a current namespace. [Ive found
myself having to define it in every file. I tried putting:

using FriendlyName = ReallyUnfriendlyName;

in the AssemblyInfo.cs file...but that does not seem to work.


You need to put it in each file. C# (as a language) doesn't have a
concept of a project or an equivalent. Each file is treated separately,
basically.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2
Hi,

AFAIK that is not possible, you will have to define it in every file
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"katzky" <ka****@discussions.microsoft.com> wrote in message
news:72**********************************@microsof t.com...
I am wondering how to assign a friendly name for an imported [using]
assembly. I understand the following:
using FriendlyName = CompanyName.AnotherName.UnfreindlyName.More;

How can I get this definition throughout a current namespace. [Ive found
myself having to define it in every file. I tried putting:

using FriendlyName = ReallyUnfriendlyName;

in the AssemblyInfo.cs file...but that does not seem to work.

Thanks for any advice.

Nov 17 '05 #3
Imports not included in C#, like they are in VB.NET, which means you have to
define by page. You can, however, edit the default templates and include
your using or create your own templates, projects types, wizards, etc. and
create a new type that has the using FriendlyName =
namespace.otherNamespace.thirdNamespace;
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
"katzky" <ka****@discussions.microsoft.com> wrote in message
news:72**********************************@microsof t.com...
I am wondering how to assign a friendly name for an imported [using]
assembly. I understand the following:
using FriendlyName = CompanyName.AnotherName.UnfreindlyName.More;

How can I get this definition throughout a current namespace. [Ive found
myself having to define it in every file. I tried putting:

using FriendlyName = ReallyUnfriendlyName;

in the AssemblyInfo.cs file...but that does not seem to work.

Thanks for any advice.

Nov 17 '05 #4

Great! Thanks!

"Cowboy (Gregory A. Beamer)" wrote:
Imports not included in C#, like they are in VB.NET, which means you have to
define by page. You can, however, edit the default templates and include
your using or create your own templates, projects types, wizards, etc. and
create a new type that has the using FriendlyName =
namespace.otherNamespace.thirdNamespace;
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
"katzky" <ka****@discussions.microsoft.com> wrote in message
news:72**********************************@microsof t.com...
I am wondering how to assign a friendly name for an imported [using]
assembly. I understand the following:
using FriendlyName = CompanyName.AnotherName.UnfreindlyName.More;

How can I get this definition throughout a current namespace. [Ive found
myself having to define it in every file. I tried putting:

using FriendlyName = ReallyUnfriendlyName;

in the AssemblyInfo.cs file...but that does not seem to work.

Thanks for any advice.


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andr? Roberge | last post by:
I have the following two files: #--testexec.py-- def exec_code(co): try: exec co except: print "error" #-- test.py--
41
by: Miguel Dias Moura | last post by:
Hello, I am working on an ASP.NET / VB page and I created a variable "query": Sub Page_Load(sender As Object, e As System.EventArgs) Dim query as String = String.Empty ... query =...
15
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for...
9
by: CDMAPoster | last post by:
About a year ago there was a thread about the use of global variables in A97: http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/fedc837a5aeb6157 Best Practices by Kang...
1
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...

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.