In addition to supporting C# and F#, .NET Core 2.0 also supports Visual Basic.
With version 2.0, .NET Core now supports Visual Basic 2017. You can use Visual Basic to create the following project types:
For example, to create a Visual Basic Hello World application, open a console window, create a directory for your project, and make it the current directory.
Enter the following command on console.
dotnet new console -lang vb.
The command creates a project file with a
.vbproj file extension, along with a Visual Basic source code file named
Program.vb file contains the source code to write the string "Hello World!" to the console window.
Imports System Module Program Sub Main(args As String()) Console.WriteLine("Hello World!") End Sub End Module
Enter the command dotnet run. The .NET Core CLI automatically compiles and executes the application, which displays the message "Hello World!" in the console window.
.NET Core 2.0 supports C# 7.1, which adds a number of new features, including: