Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# using statement application scope

Tags:

c#

using

I have a question about the using statement for multiple files at once.

I have created an overload for a class that I want to use in my program. To do so in one of my files I have added the following using statement.

using ClassName = CustomClassName;

This works, but only for that particular file.

Is there a way to get this to work for my entire project?

like image 897
Tom Avatar asked Dec 06 '22 07:12

Tom


2 Answers

No.

using directives are per file.

You can always create a template that includes it.

like image 59
Oded Avatar answered Dec 09 '22 16:12

Oded


No; C# does not have any such feature.

like image 37
SLaks Avatar answered Dec 09 '22 15:12

SLaks