Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 669803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:11:27+00:00 2026-05-14T00:11:27+00:00

Using import aliasing in one file/class, we can reference class library namespaces by assigning

  • 0

Using import aliasing in one file/class, we can reference class library namespaces by assigning our own custom alias like this:

' VB
Imports Db = Company.Lib.Data.Objects 

// C#
using Db = Company.Lib.Data.Objects;

And then we are able to reference the classes inside of Company.Lib.Data.Objects by using the Db alias that we assigned.

Is it possible to do this at the global level so that the alias is applied to the entire solution instead of just one file/class?

Currently, we are working with web applications, so I was hoping we could add something to web.config, but I am also interested in whether or not this is possible with windows forms, console apps, and/or class libraries.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:11:27+00:00Added an answer on May 14, 2026 at 12:11 am

    Yes this is a supported scenario in VB.Net projects. The way to do this is the following

    • Right Click on the project in Solution Explorer and select Properties
    • Go to the References tab
    • In the “Imported Namespaces” field type “Db=Company.Lib.Data.Objects”
    • Hit “Add User Import”

    This will set up the alias for all files in the project.

    This however does not work in C# projects. C# as a language doesn’t have the concept of a global using/import. Instead it only supports them at the file level.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 497k
  • Answers 497k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Hard to say if I'm answering your question because the… May 16, 2026 at 11:51 am
  • Editorial Team
    Editorial Team added an answer Try this bit: private static void up(string sourceFile, string targetFile)… May 16, 2026 at 11:51 am
  • Editorial Team
    Editorial Team added an answer Don't use a regular expression to match an html document.… May 16, 2026 at 11:51 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

The using keyword has three disparate meanings: type/namespace aliasing namespace import syntactic sugar for
If I import a module in IDLE using: import <module_name> print <module_name>.__file__ how can
It was my impression that using #import would only import a file once per
I'm trying to import file from the Header.jsp in my file by using import
Possible Duplicate: from . import x using __import__ ? How does one do the
I've created a Web Service using import javax.xml.ws.Endpoint and a client that connects to
What is better for performance using import some.directory.*; or import some.directory.classNeeded; Or does this
I am trying to import into oracle using imp command and the output of
I'm using this: from twisted.web.client import getPage df = getPage(url) # there is some
I want to create a contact importer application.How to Import facebook contact using php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.