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.

Re: How to by Greg

Greg
Fri Aug 25 10:15:24 CDT 2006

A "class application" do you mean a "class library"? You should jsut be able
to add a reference to the VB.NET project to the C# project and be fine.

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"ilayaraja" <ilayaraja.sivaprakasam@gmail.com> wrote in message
news:1156518490.277511.256480@74g2000cwt.googlegroups.com...
> 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.
>



Re: How to by Barry

Barry
Fri Aug 25 10:22:06 CDT 2006

ilayaraja wrote:

> 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

--
http://barrkel.blogspot.com/

Re: How to by ilayaraja

ilayaraja
Fri Aug 25 12:31:20 CDT 2006



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


Greg Young wrote:

> A "class application" do you mean a "class library"? You should jsut be able
> to add a reference to the VB.NET project to the C# project and be fine.
>
> Cheers,
>
> Greg Young
> MVP - C#
> http://codebetter.com/blogs/gregyoung
>
> "ilayaraja" <ilayaraja.sivaprakasam@gmail.com> wrote in message
> news:1156518490.277511.256480@74g2000cwt.googlegroups.com...
> > 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.
> >