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

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
 
R

rowe_newsgroups

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
 
M

Michel Posseth [MCP]

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
 
H

Herfried K. Wagner [MVP]

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!).
 
M

Michel Posseth [MCP]

and the set statement

Dim p as Process
set p = new Process

or is my memory now fooling with me ?


:)
 
R

rowe_newsgroups

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top