VB.net Object creation can be simplified

SuperCoder 216 Reputation points
2024-03-11T16:30:28.2733333+00:00

This line of VB.net code produces a "IDE0140 object creation can be simplified" warning. How do I resolve this?

 Dim SQLCommand1 As SqlCommand = New SqlCommand
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,803 questions
{count} votes

Accepted answer
  1. Anonymous
    2024-03-11T16:43:23.2966667+00:00

    Hi

    Try

    Dim SQLCommand1 As New SqlCommand
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.