![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | VB to C# I have a question. Currently my Visual Studios 2008 has its main language and setup setup as vb.net I want to ( temporarily ) switch it to compile and do things as if it was a C# or C++ compiler and work area. What would I need to change to do this? and then change it back? -Or is this even possible Thanks, Miro |
My System Specs![]() |
| | #2 (permalink) |
| | Re: VB to C# When you create a new project, you can choose the language you wish the new project to be in. After that choice is made, that project will compile using the correct compiler. So, all you have to do is make a new project, but select from the "other languages" node of the new project dialog box. If you want the language change to be more perminent, go to the Tools menu and choose "Import and Export Settings". Then choose "Reset all settings", then close Visual Studio and re-open it. When it re-opens, you'll be able to select the primary programming language. -Scott "Miro" <miro@xxxxxx> wrote in message news:en%23Np7bHJHA.4080@xxxxxx Quote: >I have a question. > > Currently my Visual Studios 2008 has its main language and setup setup as > vb.net > > I want to ( temporarily ) switch it to compile and do things as if it was > a C# or C++ compiler and work area. > > What would I need to change to do this? > > and then change it back? > > -Or is this even possible > Thanks, > > Miro |
My System Specs![]() |
| | #3 (permalink) |
| | Re: VB to C# Thank you, I was trying to do it within a project already open and could not find a "switch" button. Creating a 'new project' was exactly what I was looking for. Thank you, Miro "Scott M." <s-mar@xxxxxx> wrote in message news:uluyrHcHJHA.3668@xxxxxx Quote: > When you create a new project, you can choose the language you wish the > new project to be in. After that choice is made, that project will > compile using the correct compiler. > > So, all you have to do is make a new project, but select from the "other > languages" node of the new project dialog box. > > If you want the language change to be more perminent, go to the Tools menu > and choose "Import and Export Settings". Then choose "Reset all > settings", then close Visual Studio and re-open it. When it re-opens, > you'll be able to select the primary programming language. > > -Scott > > "Miro" <miro@xxxxxx> wrote in message > news:en%23Np7bHJHA.4080@xxxxxx Quote: >>I have a question. >> >> Currently my Visual Studios 2008 has its main language and setup setup as >> vb.net >> >> I want to ( temporarily ) switch it to compile and do things as if it was >> a C# or C++ compiler and work area. >> >> What would I need to change to do this? >> >> and then change it back? >> >> -Or is this even possible >> Thanks, >> >> Miro > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: VB to C# You cannot switch languages within a project because the various items in your project compile down to a single assembly file. As such all items within a single project must use a single .NET language. You could have one solution that contains different projects and each project could be written in a different .NET language. -Scott "Miro" <miro@xxxxxx> wrote in message news:e5mKbieHJHA.4296@xxxxxx Quote: > Thank you, > > I was trying to do it within a project already open and could not find a > "switch" button. > > Creating a 'new project' was exactly what I was looking for. > > Thank you, > > Miro > > "Scott M." <s-mar@xxxxxx> wrote in message > news:uluyrHcHJHA.3668@xxxxxx Quote: >> When you create a new project, you can choose the language you wish the >> new project to be in. After that choice is made, that project will >> compile using the correct compiler. >> >> So, all you have to do is make a new project, but select from the "other >> languages" node of the new project dialog box. >> >> If you want the language change to be more perminent, go to the Tools >> menu and choose "Import and Export Settings". Then choose "Reset all >> settings", then close Visual Studio and re-open it. When it re-opens, >> you'll be able to select the primary programming language. >> >> -Scott >> >> "Miro" <miro@xxxxxx> wrote in message >> news:en%23Np7bHJHA.4080@xxxxxx Quote: >>>I have a question. >>> >>> Currently my Visual Studios 2008 has its main language and setup setup >>> as vb.net >>> >>> I want to ( temporarily ) switch it to compile and do things as if it >>> was a C# or C++ compiler and work area. >>> >>> What would I need to change to do this? >>> >>> and then change it back? >>> >>> -Or is this even possible >>> Thanks, >>> >>> Miro >> |
My System Specs![]() |
| | #5 (permalink) |
| | Re: VB to C# Thats perfect. -I'm to new to visual studios still to know - but I thought there was a way to have a c# class called by vb.net ( i know if a class is written in vb.net you shouldnt use "optional" paramters ), but with my top statement, im assuming by your reply that that class must be in a C# project to be called? I am expecting to get some code from someone that will be in C# to try to debug it, and I was just getting ready to see how to 'open' and play with the c# files. I dont plan to re-write it ( maybe fix it ) but at least debug it to where the problem lies. Thanks for all your help. Miro "Scott M." <s-mar@xxxxxx> wrote in message news:%23jaHk1oHJHA.3736@xxxxxx Quote: > You cannot switch languages within a project because the various items in > your project compile down to a single assembly file. As such all items > within a single project must use a single .NET language. > > You could have one solution that contains different projects and each > project could be written in a different .NET language. > > -Scott > > "Miro" <miro@xxxxxx> wrote in message > news:e5mKbieHJHA.4296@xxxxxx Quote: >> Thank you, >> >> I was trying to do it within a project already open and could not find a >> "switch" button. >> >> Creating a 'new project' was exactly what I was looking for. >> >> Thank you, >> >> Miro >> >> "Scott M." <s-mar@xxxxxx> wrote in message >> news:uluyrHcHJHA.3668@xxxxxx Quote: >>> When you create a new project, you can choose the language you wish the >>> new project to be in. After that choice is made, that project will >>> compile using the correct compiler. >>> >>> So, all you have to do is make a new project, but select from the "other >>> languages" node of the new project dialog box. >>> >>> If you want the language change to be more perminent, go to the Tools >>> menu and choose "Import and Export Settings". Then choose "Reset all >>> settings", then close Visual Studio and re-open it. When it re-opens, >>> you'll be able to select the primary programming language. >>> >>> -Scott >>> >>> "Miro" <miro@xxxxxx> wrote in message >>> news:en%23Np7bHJHA.4080@xxxxxx >>>>I have a question. >>>> >>>> Currently my Visual Studios 2008 has its main language and setup setup >>>> as vb.net >>>> >>>> I want to ( temporarily ) switch it to compile and do things as if it >>>> was a C# or C++ compiler and work area. >>>> >>>> What would I need to change to do this? >>>> >>>> and then change it back? >>>> >>>> -Or is this even possible >>>> Thanks, >>>> >>>> Miro >>> >>> > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: VB to C# A C# assembly can be called from a VB .NET assembly (and vice versa), but C# source code cannot be called by VB .NET source code (and vice versa). This is why (if you want to do this), you need to have 2 different projects in one solution. Each project compiles down to its own assembly, and thus a class in one assembly can be used by another assembly (after the first assembly makes a reference to the other). "Miro" <miro@xxxxxx> wrote in message news:%23bMKhFxHJHA.5060@xxxxxx Quote: > Thats perfect. > -I'm to new to visual studios still to know - but I thought there was a > way to have a c# class called by vb.net > ( i know if a class is written in vb.net you shouldnt use "optional" > paramters ), but with my top statement, im assuming by your reply that > that class must be in a C# project to be called? > > I am expecting to get some code from someone that will be in C# to try to > debug it, and I was just getting ready to see how to 'open' and play with > the c# files. > > I dont plan to re-write it ( maybe fix it ) but at least debug it to where > the problem lies. > > Thanks for all your help. > > Miro > > "Scott M." <s-mar@xxxxxx> wrote in message > news:%23jaHk1oHJHA.3736@xxxxxx Quote: >> You cannot switch languages within a project because the various items in >> your project compile down to a single assembly file. As such all items >> within a single project must use a single .NET language. >> >> You could have one solution that contains different projects and each >> project could be written in a different .NET language. >> >> -Scott >> >> "Miro" <miro@xxxxxx> wrote in message >> news:e5mKbieHJHA.4296@xxxxxx Quote: >>> Thank you, >>> >>> I was trying to do it within a project already open and could not find a >>> "switch" button. >>> >>> Creating a 'new project' was exactly what I was looking for. >>> >>> Thank you, >>> >>> Miro >>> >>> "Scott M." <s-mar@xxxxxx> wrote in message >>> news:uluyrHcHJHA.3668@xxxxxx >>>> When you create a new project, you can choose the language you wish the >>>> new project to be in. After that choice is made, that project will >>>> compile using the correct compiler. >>>> >>>> So, all you have to do is make a new project, but select from the >>>> "other languages" node of the new project dialog box. >>>> >>>> If you want the language change to be more perminent, go to the Tools >>>> menu and choose "Import and Export Settings". Then choose "Reset all >>>> settings", then close Visual Studio and re-open it. When it re-opens, >>>> you'll be able to select the primary programming language. >>>> >>>> -Scott >>>> >>>> "Miro" <miro@xxxxxx> wrote in message >>>> news:en%23Np7bHJHA.4080@xxxxxx >>>>>I have a question. >>>>> >>>>> Currently my Visual Studios 2008 has its main language and setup setup >>>>> as vb.net >>>>> >>>>> I want to ( temporarily ) switch it to compile and do things as if it >>>>> was a C# or C++ compiler and work area. >>>>> >>>>> What would I need to change to do this? >>>>> >>>>> and then change it back? >>>>> >>>>> -Or is this even possible >>>>> Thanks, >>>>> >>>>> Miro >>>> >>>> >>> >> |
My System Specs![]() |