Hi Ramesh,
I have written a demo for you. You may have try and let me know the result.
[Client]
using System;
namespace ConsoleApplicat ion6
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
ClassLibrary3.C lass1 o = new ClassLibrary3.C lass1();
Console.WriteLi ne(o.testMethod (10));
}
}
}
[Component]
using System;
namespace ClassLibrary3
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class Class1
{
public int testMethod(int nCount)
{
return nCount*nCount;
}
}
}
Did I misunderstand your meaning?
Please feel free to let me know if you have related question.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure!
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
Content-Class: urn:content-classes:message
From: "Ramesh" <jr*****@hotmai l.com>
Sender: "Ramesh" <jr*****@hotmai l.com>
Subject: Method not found in the Com Object
Date: Tue, 2 Sep 2003 22:05:12 -0700
Lines: 33
Message-ID: <06************ *************** *@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcNx2PQzZ7Zigju JTJuJ8fc2sg31kg ==
Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
Path: cpmsftngxa06.ph x.gbl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1817 58
NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
hi,
I have created one Component using C#. it have once
class name is BusinessObject. In this class i have one
method "CreatedRecords ". When i make the build it created
ComponentName. dll file in the obj\Debug and bi\Debug
directory.
Then i have executed gacutil /i ComponentName.d ll
It displayed message saying that Cache successfully added.
In my Web application I have selected this dll reference.
(i tried both obj\debug\Compn entname.dll and
bin\Debug\Comp onentname.dll)
when i create the instance i have used following statment.
CompnentName.B usinessObject myTest = new
CompnentName.B usinessObject() ;
But when i try to access CreateRecords method by using
following statment
myTest.CreateRe cords();
it is not able to list the method name. In the component
services also CreateRecords method not listed. I have
created this method using "Public" key word in Component.
So it should list this method name when i use instance of
this object. Can any body knows about this problem.?
-Ramesh
Thanks
Ramesh