|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
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. 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 Show quote "ilayaraja" <ilayaraja.sivapraka***@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. > 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: Show quote > 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.sivapraka***@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. > > ilayaraja wrote:
> I have an Solution Named X, I have to two projects A and B. A is an Normally, to access types in a different assembly in the same solution,> 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. 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 |
|||||||||||||||||||||||