This is a discussion on What is the difference between "using System.Data;" and directly adding the reference within the ASP and ASP.NET Programming forums, part of the Web Development category; What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"? |
| Sponsored Links |
| |||
| When u compile 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 example: 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 start of ur 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 while we compile the program.. Hope this is enough for you. ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the difference between "using System.Data;" and directly adding the refer | KiruthikaSambandam | ASP and ASP.NET Programming | 1 | 11-15-2007 01:33 AM |
| Explain "passing by value", "passing by pointer" and "passing by reference" | Sabari | C and C++ Programming | 1 | 07-30-2007 11:29 PM |
| 1. What is the difference between "calloc(...)" and "malloc(...)"? | oxygen | C and C++ Programming | 1 | 07-30-2007 08:13 AM |
| I keep getting "Data Missing" when I click the "back" button in my browser. How can I | oxygen | HTML, CSS and Javascript Coding Techniques | 1 | 07-28-2007 01:12 AM |
| Difference between a "assignment operator" and a "copy constructor"? | vigneshgets | C and C++ Programming | 2 | 07-12-2007 05:30 AM |