.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

How to use one code library into another library?

Posted By: chandrakant     Posted Date: February 14, 2011    Points:2   Category :C#
I have create one solution in which i have added two project (say project 1 and project 2)which are both class library.I want to access the method of Project 2 into project 1.I have added reference of project 2 into project 1.I have add the Name space also in project 1.But when i create the object and want to access the method it does not show any method.

which way i solve this problem ?

Thanks in advance.

Responses
Author: shankey             
Posted Date: February 14, 2011     Points: 5   

hi,

following is my classlibrary2 code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ClassLibrary2
{
public class Class1
{

}
}

and then project reference to the classlibrary 1 and following is the code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClassLibrary2;

namespace ClassLibrary1
{
public class Class1
{
ClassLibrary2.Class1 objcls1 = new ClassLibrary2.Class1();
}
}


Shankey


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend