Click here to Skip to main content
16,006,475 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionWhat does the using System; line do ? Pin
S@53K^S4-May-12 3:08
S@53K^S4-May-12 3:08 
AnswerRe: What does the using System; line do ? Pin
Tony Richards4-May-12 3:21
Tony Richards4-May-12 3:21 
GeneralRe: What does the using System; line do ? Pin
S@53K^S7-May-12 4:32
S@53K^S7-May-12 4:32 
GeneralRe: What does the using System; line do ? Pin
Richard MacCutchan7-May-12 21:43
mveRichard MacCutchan7-May-12 21:43 
GeneralRe: What does the using System; line do ? Pin
S@53K^S9-May-12 4:22
S@53K^S9-May-12 4:22 
GeneralRe: What does the using System; line do ? Pin
Richard MacCutchan9-May-12 4:28
mveRichard MacCutchan9-May-12 4:28 
GeneralRe: What does the using System; line do ? Pin
S@53K^S9-May-12 4:26
S@53K^S9-May-12 4:26 
AnswerRe: What does the using System; line do ? Pin
Ron Beyer24-May-12 17:50
professionalRon Beyer24-May-12 17:50 
It doesn't "do" anything, it simply instructs the compiler where to look (in referenced DLL's or in .NET language, "assemblies"). They aren't evaluated during runtime at all, it's only used in the preprocessor during the linking phase of the compilation process.

Like the other poster said, if you don't use the "using" statement, you have to explicitly identify where to find certain functions in the included assemblies. It essentially just saves a lot of typing as stated.

Oddly enough, the "using" statement can also be used to re-assign namespaces and class names. You can use it to "alias" namespaces.

Another "using" keyword is to limit the scope of a variable and do automatic clean-up, like:

using (SolidBrush sb = new SolidBrush(Color.Red))
{
//Use the solid brush here
}
//Here the solid brush no longer exists, and the object is correctly disposed.
QuestionHello Everybody Pin
Member 878997430-Apr-12 11:20
Member 878997430-Apr-12 11:20 
AnswerRe: Hello Everybody Pin
Wes Aday30-Apr-12 11:39
professionalWes Aday30-Apr-12 11:39 
AnswerRe: Hello Everybody Pin
Dave Kreskowiak30-Apr-12 13:20
mveDave Kreskowiak30-Apr-12 13:20 
Questionhow to find creation time of file that is taken using fileupload contro? Pin
karan 201229-Apr-12 19:19
karan 201229-Apr-12 19:19 
AnswerRe: how to find creation time of file that is taken using fileupload contro? Pin
Alan N29-Apr-12 22:27
Alan N29-Apr-12 22:27 
QuestionStoring Large Object Array to File Pin
KenEldridge26-Apr-12 14:31
KenEldridge26-Apr-12 14:31 
AnswerRe: Storing Large Object Array to File Pin
Pete O'Hanlon26-Apr-12 20:06
mvePete O'Hanlon26-Apr-12 20:06 
QuestionRe: Storing Large Object Array to File Pin
KenEldridge27-Apr-12 6:56
KenEldridge27-Apr-12 6:56 
QuestionHow can i pass List<> to Oracle SP. Pin
sakthi250625-Apr-12 0:13
sakthi250625-Apr-12 0:13 
AnswerRe: How can i pass List to Oracle SP. Pin
Pete O'Hanlon25-Apr-12 0:34
mvePete O'Hanlon25-Apr-12 0:34 
AnswerRe: How can i pass List to Oracle SP. Pin
Eddy Vluggen25-Apr-12 5:09
professionalEddy Vluggen25-Apr-12 5:09 
GeneralRe: How can i pass List to Oracle SP. Pin
sakthi250626-Apr-12 2:00
sakthi250626-Apr-12 2:00 
QuestionHow can i pass List<> as a parameter to oracle SP Pin
sakthi250624-Apr-12 2:41
sakthi250624-Apr-12 2:41 
AnswerRe: How can i pass List as a parameter to oracle SP Pin
Eddy Vluggen24-Apr-12 5:32
professionalEddy Vluggen24-Apr-12 5:32 
QuestionHow can i pass List<> as a parameter to oracle SP Pin
sakthi250624-Apr-12 2:40
sakthi250624-Apr-12 2:40 
QuestionWhich is the Best ORM tool for .NET? Pin
Yordan-Petrov22-Apr-12 22:28
Yordan-Petrov22-Apr-12 22:28 
AnswerRe: Which is the Best ORM tool for .NET? Pin
Reza Ahmadi23-Apr-12 0:04
Reza Ahmadi23-Apr-12 0:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.