VB.NET equivalent to C#'s using directive?

You're looking for the Imports statement. Place any import statements that you need at the very top of your code file, just like the using directive in C#: Imports moOutlook = Microsoft.Office.Interop. Outlook Imports moExcel = Microsoft.Office.Interop.

Excel Namespace ReportGen Public Class Reports 'Your code here End Class End Namespace.

Here is a link showing a syntax comparison between C# and VB. NET side by side. harding.edu/fmccown/vbnet_csharp_compari... From the link: Using reader As StreamReader = File.

OpenText("test. Txt") Dim line As String = reader.ReadLine() While Not line Is Nothing Console. WriteLine(line) line = reader.ReadLine() End While End Using Or the imports statement (from site also): Imports System Namespace Class World Overloads Shared Sub Main(ByVal args() As String) Dim name As String = "VB.NET" 'See if an argument was passed from the command line If args.

Length = 1 Then name = args(0) Console. WriteLine(" " & name & "!") End Sub End Class End Namespace.

Imports moOutlook = Microsoft.Office.Interop. Outlook; Imports moExcel = Microsoft.Office.Interop. Excel; see: Global Import/using Aliasing in .NET.

It's still the Using Statement: Using conn As New SqlConnection(connString) ' Your code ' End Using.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions