Global Using ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
katzky said:
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.
 
Hi,

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


cheers,
 
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!
***********************************************
 
Great! Thanks!

Cowboy (Gregory A. Beamer) said:
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 said:
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.
 
Back
Top