Question:

Declaring an instance of a class in vb.net?

by  |  earlier

0 LIKES UnLike

Hi,

Can anyone tell me what the difference is between initialising an instance of a class with "= New" and "As New". Examples as follows:

Dim dt As New DataSet.PageDetailsDataTable

Dim dt = New DataSet.PageDetailsDataTable

Thanks!

 Tags:

   Report

1 ANSWERS


  1. The first statement declares and instantiates the object in the same statement, the second instantiates a previously declared object.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.