Hi Ramesh,
I have written a demo for you. You may have try and let me know the result.
[Client]
using System;
namespace ConsoleApplication6
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
ClassLibrary3.Class1 o = new ClassLibrary3.Class1();
Console.WriteLine(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*****@hotmail.com>
Sender: "Ramesh" <jr*****@hotmail.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: AcNx2PQzZ7ZigjuJTJuJ8fc2sg31kg==
Newsgroups: microsoft.public.dotnet.languages.csharp
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:181758
NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
X-Tomcat-NG: microsoft.public.dotnet.languages.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.dll
It displayed message saying that Cache successfully added.
In my Web application I have selected this dll reference.
(i tried both obj\debug\Compnentname.dll and
bin\Debug\Componentname.dll)
when i create the instance i have used following statment.
CompnentName.BusinessObject myTest = new
CompnentName.BusinessObject();
But when i try to access CreateRecords method by using
following statment
myTest.CreateRecords();
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