- 1

Why to use using in the code

25th Jun 2017, 2:19 PM
Ankita Panda
Ankita Panda - avatar
8 Answers
+ 1
What code?
25th Jun 2017, 2:44 PM
Limitless
Limitless - avatar
+ 1
C# is a very powerful language that is great in running Data on a server, making applications on a computer or even being a server. C# is a lot like Java
25th Jun 2017, 2:45 PM
Limitless
Limitless - avatar
+ 1
What is your question ? A) Why to use code B) What is using(){} and when do you use it ? Can you give a example ?
25th Jun 2017, 6:29 PM
sneeze
sneeze - avatar
+ 1
do you mean for example "using system.IO;" ?
27th Jun 2017, 2:00 PM
sneeze
sneeze - avatar
0
in java programming the strating statement is package ...... in c# programming also the programme is also starting with using .... so my question is why "using" is used in c# programme
27th Jun 2017, 8:33 AM
Ankita Panda
Ankita Panda - avatar
0
yrs
27th Jun 2017, 2:01 PM
Ankita Panda
Ankita Panda - avatar
0
yes*
27th Jun 2017, 2:01 PM
Ankita Panda
Ankita Panda - avatar
0
now I understand. The using directive. It is a shortcut label to the libraries that are referenced. if you have a line using System; Console.WriteLine("hello world"); if you also may write using System.Console; WriteLine("hello world"); If you use WriteLine a lot, it saves you from typing. And there is a lot less code On the otherside it can be confusing, because you can't read from which class the WriteLine is Also a WriteLine from a other class can give conflicts if you do not type the full name. https://csharp.today/c-tutorial-namespace-and-using-directive/
27th Jun 2017, 7:59 PM
sneeze
sneeze - avatar