rohan_from_mars said:
Thanx buddy!! Your solution worked.
I was not knowing the concept of adding reference
No worries buddy!
When you create a new solution in Visual Studio, it assumes you want to
use some DLL's by default. For example, in a Windows App, it assumes
you will want to use System.Windows.Forms.dll so it adds a reference
for you by default. In the reference list you can see which ones were
already there.
You can add references to any .NET assembly, such as System.web,
System.XML, 3rd party components like Infragistics UI library, or even
your own projects (if, for example, you add a second project to your
solution of type "class library"). You can also add COM references to
older components that aren't written in .NET.
The "Using" statement that you were using only tells the code in the
current file that you don't need to use the full type name. For
example, if I want to connect to a SQL Server database, I have to write
code like this:
System.Data.SqlClient.SqlConnection dbc =
new System.Data.SqlClient.SqlConnection(CONNECTION_STRING);
But if you add the following code:
using System.Data.SqlClient;
... then you can shorten what you write to:
SqlConnection dbc = new SqlConnection(CONNECTION_STRING);