what is the difference between using systemdata


What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"?

When you compiles a program using command line, u add the references using /r switch. When you compile a program using Visual Studio, it adds those references to our assembly, which are added using "Add Reference" dialog box. While "using" statement facilitates us to use classes without using their fully qualified names.

For instance: if u have added a reference to "System.Data.SqlClient" using "Add Reference" dialog box then u can use SqlConnection class like this:

System.Data.SqlClient.SqlConnection

But if u add a "using System.Data.SqlClient" statement at the begin of your code then u can directly use SqlConnection class.

On the other hand if u add a reference using "using System.Data.SqlClient" statement, but don't add it using "Add Reference" dialog box, Visual Studio will give error message whereas we compile the program.

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: what is the difference between using systemdata
Reference No:- TGS0310381

Expected delivery within 24 Hours