Use full class name or import?

Asked

Viewed 16 times

1

My question is this::

if I’m going to use a specific class only once in a location, I should import all of it up there in the code?

Example:

Suppose I want to get some information from web.config in a class, attach information, and only once, it is preferable for me to do

System.Configuration.ConfigurationManager.AppSettings["minha_info"]

or

using System.Configuration;

// ...

ConfigurationManager.AppSettings["minha_info"]
  • Thank you very much, that’s exactly what I wanted

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.