shubha
What is the use of ‘using’ declaration.
By shubha in OOP/OOD on Jul 13 2006
  • Renu Agarwal
    Aug, 2016 12

    using keyword in .net has the following usage: 1. it is used when you want to include a namespace in your current class and use the classes and properties of that namespace without the need to give fully qualified names.for example: using System; 2. it is used when you want to mark an object to be disposed as soon as it exits the current execution block allowing the garbage collector to collect it.for example:using (A obj = new A()) {//some operation goes here}This requires the class to implement IDisposable interface.

    • 0
  • Keerthi Venkatesan
    May, 2016 18

    A using declaration provides access to a specific namespace member. This is accomplished by applying the using keyword to a namespace name with its corresponding namespace member.

    • 0
  • shubha
    Jul, 2006 13

    A using declaration makes it possible to use a name from a namespace without the scope operator..

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS