Share via

VB.net Object creation can be simplified

SuperCoder 376 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
Developer technologies | VB

Answer accepted by question author

Anonymous
2024-03-11T16:43:23.2966667+00:00

Hi

Try

Dim SQLCommand1 As New SqlCommand

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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