Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
How do you use the “using” statement in C#?
Home
Technology
How do you use the “using” statement in C#?
asked
Apr 1, 2021
in
Technology
by
JackTerrance
How do you use the “using” statement in C#?
interview-question-answer
technology-questions-answers
1
Answer
0
votes
answered
Apr 1, 2021
by
JackTerrance
There are two ways to use the using keyword in C#. One is as a directive and the other is as a statement. Let's explain!
using Directive
Generally, we use the using keyword to add namespaces in code-behind and class files. Then it makes available all the classes, interfaces and abstract classes and their methods and properties on the current page. Adding a namespace can be done in the following two ways:
Using Statement
This is another way to use the using keyword in C#. It plays a vital role in improving performance in Garbage Collection.
Related questions
0
votes
Q: Why do we use Async and Await in C#?
Why do we use Async and Await in C#?...
asked
Jul 27, 2021
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: What do you mean by value types and reference types in C#?
What do you mean by value types and reference types in C#?...
asked
Jul 27, 2021
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: When should you apply “next” statement in R? When is it appropriate to use the “next” statement in R?
When should you apply “next” statement in R? When is it appropriate to use the “next” statement in R?...
asked
Oct 16, 2020
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: Smriti wants to give output of a program in infinite loop which statement will you suggest to her to use?
Smriti wants to give output of a program in infinite loop which statement will you suggest to her to use? In qbasic Select the correct answer from above options...
asked
Dec 21, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: What is the Use of Dual-axis? How Do You Create One?
What is the Use of Dual-axis? How Do You Create One?...
asked
Mar 30, 2021
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: “Entrepreneurs are born, not made.” Do you agree with this statement? Justify your answer.
“Entrepreneurs are born, not made.” Do you agree with this statement? Justify your answer. Please answer the above question....
asked
Aug 23, 2022
in
Education
by
JackTerrance
artificial
intelligence
ai
latest
questions
and
answer
0
votes
Q: South Asia stands for diversity in every sense and yet constitutes one geo-political space. Do you agree with the statement?
South Asia stands for diversity in every sense and yet constitutes one geo-political space. Do you agree with the ... for your answer. Select the correct answer from above options...
asked
Aug 3, 2022
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: What do you mean by danglimg if statement…..in simple language
What do you mean by danglimg if statement…..in simple language Select the correct answer from above options...
asked
Dec 19, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: How do you use an inset box-shadow with a background-color with before and after?
When assigning a background color of a table cell on hover, the box shadow is covered. I have found ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Apr 24, 2022
in
Education
by
JackTerrance
html
0
votes
Q: How do you use an inset box-shadow with a background-color with before and after?
When assigning a background color of a table cell on hover, the box shadow is covered. I have found ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Apr 21, 2022
in
Education
by
JackTerrance
html
0
votes
Q: How do you use the client.delete_channel() command in pythons for discord bots
I need to know how to use the delete_channel command in discord.py may someone please post a code sample ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Apr 12, 2022
in
Education
by
JackTerrance
python
0
votes
Q: How do you use the client.delete_channel() command in pythons for discord bots
I need to know how to use the delete_channel command in discord.py may someone please post a code sample ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Apr 10, 2022
in
Education
by
JackTerrance
python
0
votes
Q: How do you update the records with or without using Update Strategy?
How do you update the records with or without using Update Strategy?...
asked
Mar 28, 2021
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: How do you push a file from your local system to the GitHub repository using Git?
How do you push a file from your local system to the GitHub repository using Git?...
asked
Oct 4, 2020
in
Technology
by
Editorial Staff
interview-question-answer
technology-questions-answers
0
votes
Q: How do I update the GUI from another thread in C#?
How do I update the GUI from another thread in C#?...
asked
Jan 16, 2021
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
...