Dim p As Process = New Process() vs Dim p as New Process()

  • Thread starter Thread starter Ronald S. Cook
  • Start date Start date
R

Ronald S. Cook

Is there a difference between these two lines?

Dim p As Process = New Process()

Dim p As New Process()


Thanks,
Ron
 
Is there a difference between these two lines?

Dim p As Process = New Process()

Dim p As New Process()

Thanks,
Ron

Nothing - they accomplish the same task.

Thanks,

Seth Rowe
 
Is there a difference between these two lines?

In this situation no ,,,,, except the typing length they do exactly the same
thingy ( construct a new process object and assign value pointer p to it )

regards

michel
 
Ronald S. Cook said:
Is there a difference between these two lines?

Dim p As Process = New Process()

Dim p As New Process()


No difference, except visually (note that there was a huge difference
between the two lines in VB6!).
 
and the set statement

Dim p as Process
set p = new Process

or is my memory now fooling with me ?


:-)
 
and the set statement

Ahh, the Set statement, the keyword I spent months trying to forget
after switching to .Net, and apparently I finally succeeded!
or is my memory now fooling with me ?

Nope, mine is just failing...

Thanks,

Seth Rowe
 
Back
Top