Question : How to use C# code in a VB.NET project

I have a VB.NET project and have found some code written in C# that performs some of the functions I need. Rather than trying to convert it and hope it works, I would like to leave it as is. Since all the languages use the same CLR can't I use both in a project ? Pass values back and forth ? It is a web project btw

Answer : How to use C# code in a VB.NET project

Set @TotalParticipantNr_BeginP =
CASE WHEN
(Sum(@CVD12Nr_BeginP + @CVD34Nr_BeginP + @CVD56Nr_BeginP + @CVD78Nr_BeginP + @CVD910Nr_BeginP + @IDONTKNOWNr_BeginP + @MissedNr_BeginP)) > 100 then 100 else
Set @TotalParticipantNr_BeginP = (Sum(@CVD12Nr_BeginP + @CVD34Nr_BeginP + @CVD56Nr_BeginP + @CVD78Nr_BeginP + @CVD910Nr_BeginP + @IDONTKNOWNr_BeginP + @MissedNr_BeginP))
end


That is a workaround.
The problem is that when you round things up at each point, you inevitably get a sum that is not equal to the total.
Simple case of two components that end up with 45.5 and 54.5.
If you show them at a round number, they will be 46 and 55.  46+55 = 101.
Random Solutions  
 
programming4us programming4us