few projects in one solution

hi,

if I have 2 projects in 1 solution. one project is written in VB and one 
in C#. Should I expect some problems? or this will work correctly?

regards
daniel
0
kazik
2/4/2010 6:40:42 PM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

5 Replies
510 Views

Similar Articles

[PageSpeed] 21

"kazik" <kazik79@o2.pl> wrote in message 
news:hkf4h5$c5h$1@mx1.internetia.pl...
> if I have 2 projects in 1 solution. one project is written in VB and one 
> in C#. Should I expect some problems? or this will work correctly?

    No problems at all. It should work without any trouble.

0
Alberto
2/4/2010 6:54:36 PM
kazik wrote:
> hi,
> 
> if I have 2 projects in 1 solution. one project is written in VB and one 
> in C#. Should I expect some problems? or this will work correctly?

You could just try it.

But, no…you shouldn't have any problems.  I mix project types in the 
same solution all the time.

Pete
0
Peter
2/4/2010 7:00:47 PM
On 2/4/2010 1:40 PM, kazik wrote:
> hi,
>
> if I have 2 projects in 1 solution. one project is written in VB and one
> in C#. Should I expect some problems? or this will work correctly?
>
> regards
> daniel

For the most part, no problem.  From C#, you cannot (to the best of my 
knowledge) call a vb.net subroutine or function contained within a 
module.  The subroutine or function must be part of an instantiable or 
shared vb.net class.

-- 
Mike
0
Family
2/5/2010 1:33:44 AM
Family Tree Mike wrote:
> On 2/4/2010 1:40 PM, kazik wrote:
>> hi,
>>
>> if I have 2 projects in 1 solution. one project is written in VB and one
>> in C#. Should I expect some problems? or this will work correctly?
>>
>> regards
>> daniel
> 
> For the most part, no problem.  From C#, you cannot (to the best of my 
> knowledge) call a vb.net subroutine or function contained within a 
> module.  The subroutine or function must be part of an instantiable or 
> shared vb.net class.

Actually, a "Module" in VB.NET just winds up being a .NET class.  By 
default, it's "internal" and the Subs and Functions in it "static".  But 
if you explicitly declare it as "Public", you can access public members 
in it just like you could members of any other class.

For example, assuming a VB.NET project "ClassLibrary1" with a Module1.vb 
like this:

Public Module Module1
     Sub SomeMethod()
         Console.WriteLine("Module1.SomeMethod")
     End Sub
End Module


And a C# project with a Program.cs like this:

using System;

namespace TestCallVBGlobal
{
     class Program
     {
         static void Main(string[] args)
         {
             ClassLibrary1.Module1.SomeMethod();
         }
     }
}


If you add a reference to the "ClassLibrary1" DLL in the C# project, the 
above C# will compile fine and do just what you'd expect.

Pete
0
Peter
2/5/2010 2:28:56 AM
On 2/4/2010 9:28 PM, Peter Duniho wrote:
> Family Tree Mike wrote:
>> On 2/4/2010 1:40 PM, kazik wrote:
>>> hi,
>>>
>>> if I have 2 projects in 1 solution. one project is written in VB and one
>>> in C#. Should I expect some problems? or this will work correctly?
>>>
>>> regards
>>> daniel
>>
>> For the most part, no problem. From C#, you cannot (to the best of my
>> knowledge) call a vb.net subroutine or function contained within a
>> module. The subroutine or function must be part of an instantiable or
>> shared vb.net class.
>
> Actually, a "Module" in VB.NET just winds up being a .NET class. By
> default, it's "internal" and the Subs and Functions in it "static". But
> if you explicitly declare it as "Public", you can access public members
> in it just like you could members of any other class.
>
> For example, assuming a VB.NET project "ClassLibrary1" with a Module1.vb
> like this:
>
> Public Module Module1
> Sub SomeMethod()
> Console.WriteLine("Module1.SomeMethod")
> End Sub
> End Module
>
>
> And a C# project with a Program.cs like this:
>
> using System;
>
> namespace TestCallVBGlobal
> {
> class Program
> {
> static void Main(string[] args)
> {
> ClassLibrary1.Module1.SomeMethod();
> }
> }
> }
>
>
> If you add a reference to the "ClassLibrary1" DLL in the C# project, the
> above C# will compile fine and do just what you'd expect.
>
> Pete

Thanks!  Never knew that would work!

-- 
Mike
0
Family
2/5/2010 2:56:30 AM
Reply:

Similar Artilces:

more than one business reply
tried his as a reply & it bounced. Hi I use money y2k SB and do this. I designate revenue under 2 separate files (my wife & I both own businesses that we owned when we married; separate v community property). Example revenue-me & revenue-wife. Then I have sub-categories for types of revenue (sales, etc.) for each category. When setting up the txf file to export to TurboTax it sets up separate schedule c's. Actually, I'm doing 3 businesses this way; one for her & 2 for me; separate mine with the sub categories. Hope this helps! Lew "KEK" <anonymous@disc...

Copy PDK employee information from one company to another
Hi everyone, In PDK, is there a way to copy all the active employee's information from one company to a new one? Thanks a bunch Ian, I dont think we do have such option in PDK and if someone else says it do exist, it'd be a good learning for me as well. Thanks Janakiram M.P. MCP-GP "Ian2009" wrote: > Hi everyone, > > In PDK, is there a way to copy all the active employee's information from > one company to a new one? > > Thanks a bunch ...

drag a formula downa column keeping one value the same?
I need to drag a formula down a column, but keep one value constant (when I drag the formula down, the values in the formula change according to the row, but I need to keep one constant so each cell's formula refers to one specific cell.) Ex. - =IF(L30>40000,L1*.60,=IF(L30<20000,L1*.5,=IF(L30<40000,L1*.55,0))) I need to keep the L30 values the same, while the L1 changes for each row, but when I drag this formula down the column, the L30 changes. Thanks! Change your L30 to a absolute reference $L$30 -- If this helps, please remember to click yes. "...

occult one sheet only
how to occult a all sheet only? its possible? thanks Marina Format-->Sheet-->Hide. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "Marina Limeira" <marinalimeiraa@yahoo.com.br> wrote in message news:%23CY6PbveFHA.1044@TK2MSFTNGP10.phx.gbl... > how to occult a all sheet only? > > its possible? > > thanks > > Marina > > ...

RE: Plotting more than one series of data on a x-y chart
I am looking for assistance to plot two data sets on same map, date of measurement on x and two sets of elevation data on y, how do I plot both of these, I selected to plot both data sets and when I went from step 3 to step 4 and went to change y axis to better show data, data went off plt, both data are in same range and are within 0.5 numerical value of each other Any assistance would be appreciated lhensel@mcemichigan.com Linda - Arrange your data with X in the first column, and the two Ys in the next two columns. Select the data and make your chart. Excel should use the first c...

how 2 make one cell change title when either of 2 other are > 1
i want to make a cell [heading 1] (that is a list of two headings) change to [heading 2] if either one of two other cells are greater than 0 but revert back to [heading 1] if not. In the Heading cell: =if(max(c9,d37)>0,"Heading2here","heading1here") confuscious wrote: > > i want to make a cell [heading 1] (that is a list of two headings) change to > [heading 2] if either one of two other cells are greater than 0 but revert > back to [heading 1] if not. -- Dave Peterson If I understood your question correctly thy this: in cell A1 copy and paste this...

How to avoid a control covering another one?
hi,all For example, in vc++, I have two Labels, Label1 and Label2. I will move Label2 from window's top to window's bottom. When Label2 passes Label1, it is covered by Label1 and can be seen. So how to make sure Label2 is on the top of Lable1 when they are together? SetWindowPos so the Z-order of label2 is correct with respect to label1. Note that this might have other effects on your code, e.g., the Z-order of labels with shortcuts is to set the focus on the next active control, so you may have to reset it after you move it to make sure it is back to the correct relationship with oth...

Combine data in fields within one table
Greetings, I'm trying to combine data in fields that I currently have in multiple fields. Allow me to elaborate. Lead employees are assigned a case (with a unique ID number) and may or may not have other support employees working with them. The DB record thus shows a lead employee in one field, the unique number in another and finally the possibility of up to four employees (shown in four distinct fields) as team members. I need these four employees to show up in a new query that shows them in a distinct record separate from the lead employee. This is a superlist, if you will, that show...

Copying the colour of one cell to anothers.
Hi guys, I am currently working on an Excel spreadsheet that shows a student's predicted grades and their 'current' actual grades (these grades have been pulled in from another sheet in the same workbook so they are always the most up to date). I have a second column next to the current grades and the predicted ones, in this column i have assigned a value to the cell based on the predicted/actual grade i.e. if P then 2, if M then 4, etc. From this i have then done conditional formatting on the assigned value so that if the current grade value is less than the predicted it turns ...

how do i disable one note?
it just popped up on my computer, snags anything that needs to be printed and prints it poorly. i want this gone. how? sarap66 wrote: > it just popped up on my computer, snags anything that needs to be > printed and prints it poorly. i want this gone. how? Obviously on installing OneNote the "Send to OneNote" printer has not only been installed but also been set as the *default*. Go to "Control Panel | Printers" and set your standard printer as the default. Apart from that: As you gave installed OneNote, try it out thoroughly! You'd really ...

LNK4006 errors in VS.NET caused by setting project dependencies
Hello! I'm fighting the same problem as Roger in following description: http://www.dotnet247.com/247reference/msgs/37/186281.aspx Have anyone alternative answers? Cazzy Cape ...

Show tasks due, meetings to go to, and flagged messages in one window?
Outlook 2002. I'd like to create that shows all the things I have to be concerned about today, which includes: - appointments - tasks that are due - email messages flagged for follow-up - contacts flagged for follow-up I don't want to drag items to other folders (such as the tasks folder) because this creates static items which are not linked to the original item, and hence don't reflect what's really going on. I've spent some time on Slipstick, but haven't found anything. (Although I've found a few programs that do this for the Palm). Any one have further sugg...

Busniess Portal 2.5 Project Time Entry
Show the pay code drop down box for each activity code beside (to the right) of each project task listed on the time sheet instead of having to open the "edit task details" window. This will assist in approvals by allowing the pay code to be viewed right from the time sheet and also drastically speed up time sheet entry. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to ...

Copy structures from one db to another
Hi. I have several related database models which have many of thesame structures (tables/queries/reports). I usually develop or changesome of those structures within one database and then copy them to theother. The problem is that when I copy and paste them, I can't selectmultiple structures at once. Also, when I paste them, it would benice if I didn't have to type the name again (or copy and paste thename separately). I know this is a little bit picky, but it reallydoes take a lot of time.Does anyone have any idea how to do this? On 23 Mar 2007 14:22:54 -0700, kramer31 wrote:>...

Copy a table from one workbook to ALL worksheets in a different wb
Hello Excel Gurus! I need to copy a summary table that is in workbook "A" to all worksheets contained in workbbok "B". Sometimes workbook "B" have 800+ worksheets. So I tried to make a macro that would that for me as follows: Windows("A.xlsm").Activate Range("A1:B17").Select Selection.Copy Windows("B.xls").Activate Dim Wks As Worksheet For Each Wks In ActiveWorkbook.Worksheets With Wks Range("B31").Select ActiveSheet.Paste End With Next Wks Windows("A.xlsm"...

How Can I show 3 different lines in one chart?
I've created 3 different line charts and am trying to combine them all into one chart with a different color for each line. Each line designates a different type of customer service. I can't figure out how to do it? Can anybody help? -- B''''''''''''''''s mom Hi, Select one of your existing charts. Right click and pick Source Data from the popup menu. On the Series tab use the Add button to add another series to the chart. Then go to the Values box and define the range for the data. Repeat for the 3rd series. ...

Boss wants to secretly intercept all outgoing mail for ONE user. h
Dear friends My boss wants to secretly/transparently intercept/divert all outgoing email for one particular user in our system so that the mail can be read by him before it really gets delivered. How can I implement this? Would Exchange 2007 support this tweak? Don't know what version of Exchange you are using, however: I don't know about delaying it's delivery but you can have Exchange 2003 send a copy of all that person's email to your boss. You would go into Active Directory Users and Computers and open that user's AD profile. Go to the "Exchange General&...

for independent contractors on a project enter their time either .
In a later Convergence session, the request came up to have the capability for independent contractors on a project enter their time either in PDK or Business Portal and then have the both the billing extension post to the project in PA and the cost extension of the payable post to Accounts Payable. Any possibility of this software modification occurring soon? Apparently the Olympic Project solution out of Washington already has this capability. Further, multiple people in the room agreed they needed this. Alan Baumbach, CPA, abaumbach@techvisions.tv --- NOTE THIS NEW EMAIL ADDRESS!! Busine...

Two Logins With One Bank
I purchased Microsoft Money 2005 Deluxe with the hope that most of my banks had been added to make my life simpler. I noticed that the new program works with Capital One bank/credit cards, but I am having a problem getting it to work. Unlike MBNA, if you have more than one credit card with CapitalOne you have to log into their website with two different log ins. I got Money2005 to connect and update/download my transactions for one account, but I cant seem to find how to tell it to use a different log in name/password for the 2nd account. Has anyone else come across this problem and ...

More than one line of copy in a cell
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I have three columns per page. First column contains 6 numbers, second column 10 numbers (they fit easily), third column approx 100 words. The words flow on across to the next sheet. How do I constrict the information to the column where I want it to be! Select the cells, go to Format> Cells> Alignment, then check the box for 'Wrap text'... You may have to adjust the Row Height to your liking because it will increase based on the largest number of lines in any cell in a row. HTH |:>) Bob Jon...

What good are Two Exchange 2003 servers if one fails?
If I have one exchange 2003 of the west cost with 100 users and another on the east with 30 users, can I use the other as a backup if one is down? A local integrator is telling me yes, but he's not sure exactly how this would work exactly. Thanks! no way, unless you've implemented a GeoSpan clustering solution... "admin too" <nguser2u@no.spam.AOL.com> wrote in message news:1092cj3b0fvk06e@news.supernews.com... > If I have one exchange 2003 of the west cost with 100 users and another on > the east with 30 users, can I use the other as a backup if one is down? ...

Subtract one time from another and get answer in minutes
Does anyone know how to subtract two times from each other and get the answer in the number of minutes? Hi Try =(A2-A1)*24*60 due to there being 24 hours in a day and 60 minutes in an hour. -- Andy. "Zoombini" <Zoombini@discussions.microsoft.com> wrote in message news:E8368C7E-E2F8-47CF-A52A-E27D90ACD71B@microsoft.com... > Does anyone know how to subtract two times from each other and get the > answer > in the number of minutes? Hi Zoombini, > Does anyone know how to subtract two times from each other and get the answer > in the number of minutes? ...

This is a tuff one
Just wondering if any other exchange gurus have ever seen this error. I am running exchange 5.5 on a windows 2000 server both the os and exchange are running sp4. The network is also a 2003 active directory network. The error is as states: Event Type: Error Event Source: MSExchangeFB Event Category: None Event ID: 1035 Date: 11/14/2003 Time: 2:32:11 PM User: N/A Computer: EXCHANGE Description: Unable to open or read a message in the Microsoft Schedule+ Free/Busy Connector inbox from Microsoft Schedule+ Free/Busy Connector (EXCHANGE). It shows up many times a day in the event viewer...

Incrementing numbers by one?
Just trying to write a simple database for the first time. Data to show student name, type of certificate and certificate number. I want to start certificate numbers from eg. 1910. then each new student added to ahve the certificate number automatically incremented by one. So the last record would show certificate number 1910 the next new one 1911 and so on. Is this possible and, if so, how do I go about it. Not sure I have explained myself too well here. Also keep in mind that I am very new to Access! Appreciate any help. Thanks Dave Dave, Make the DefaultValue of your CertNos fi...

How do I insert only one 11x17 page in a book of 8.5x11 pages?
I have to insert one 11 x 17 page in the middle of a book because it's a fold out map. However, the rest of the booklet is created on regular 8.5 x 11 pages. Is it possible to do this? How do I do it? Thanks! It must be a separate document. You cannot have multiple sizes or orientations in a single Publisher document. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "DannyFolio" <DannyFolio@discussions.microsoft.com> wrote in message news:962F34F1-F6FE-4FFA-B1B0-459D643DE3B0@microsoft.com... >I have...