+ 3
What is the difference between c# and visual studion (vb.net)?
can you use them in a same code
3 Respostas
+ 4
thanks
+ 1
Moreover say.
The Visual Studio for .NET is a complex editor for programming from Microsoft. It supports mainly the programming languages specially created for .NET. And they are - mainly Visual Basic for .NET and C#.
Just for explanation - the .NET is a large library of new, modern functions (classes), which can be called from program code.
So, the codes from different .NET languages can be similar, althoug have a different syntax, but they call the same methods from .NET library.
Here you see the sample in Visual Basic for .NET
Imports System
Public Module Module1
Public Sub Main()
DIM a,b,c as integer
Console.WriteLine("Fisrst number:")
a=Int32.Parse(Console.ReadLine())
Console.WriteLine("Second number:")
b=Int32.Parse(Console.ReadLine())
c=a+b
Console.WriteLine("The sum is " & c)
End Sub
End Module
-------------------------
and c#
using System;
public class Program
{
public static void Main()
{
int a,b,c;
Console.WriteLine("Fisrst number:");
a=Int32.Parse(Console.ReadLine());
Console.WriteLine("Second number:");
b=Int32.Parse(Console.ReadLine());
c=a+b;
Console.WriteLine("The sum is " + c);
}
}