How to

  • Thread starter Thread starter ilayaraja
  • Start date Start date
I

ilayaraja

Hi All,

I am Ilayaraja. I have a interesting (might be beginners) doubt in
Dot Net framework.

I have an Solution Named X, I have to two projects A and B. A is an
windows Applicaiton developed in VB.Net 2005 and B is an Class
Application developed in C# 2005.

B has an class similar to this..

public class Class1
{
public static string Upper(string a)
{
string s;
s = a.ToUpper();
}
}

I want to refer this class in VB form in the button click event.

How to do that..

One solution I have got is that creating a DLL file for the class and
give it an reference in the VB project and remove the Class application
from the solution file.

Do we have any other solution for this doubt?

Please help me on this.
 
ilayaraja said:
I have an Solution Named X, I have to two projects A and B. A is an
windows Applicaiton developed in VB.Net 2005 and B is an Class
Application developed in C# 2005.
I want to refer this class in VB form in the button click event.
One solution I have got is that creating a DLL file for the class and
give it an reference in the VB project and remove the Class application
from the solution file.

Normally, to access types in a different assembly in the same solution,
you add the project as a "Project Reference", like you say. But you
would not normally "remove the Class application from the solution file"
- that would break it.

-- Barry
 
Hi Greg,

I tried that. I got succeded when I built the class library and
convert that to an DLL. Is that the way you are referring. Or Can I use
the class without building to an DLL?

Cheers,
Raja
 
Back
Top