Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / April 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ronald S. Cook - 11 Apr 2007 15:55 GMT
Is there a difference between these two lines?

Dim p As Process = New Process()

Dim p As New Process()

Thanks,
Ron
rowe_newsgroups - 11 Apr 2007 16:47 GMT
> Is there a difference between these two lines?
>
[quoted text clipped - 4 lines]
> Thanks,
> Ron

Nothing - they accomplish the same task.

Thanks,

Seth Rowe
Michel Posseth  [MCP] - 11 Apr 2007 17:48 GMT
> 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

> Is there a difference between these two lines?
>
[quoted text clipped - 4 lines]
> Thanks,
> Ron
Herfried K. Wagner [MVP] - 11 Apr 2007 21:56 GMT
"Ronald S. Cook" <rcook@westinis.com> schrieb:
> 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!).

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>

rowe_newsgroups - 12 Apr 2007 11:42 GMT
On Apr 11, 4:56 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.at> wrote:
> "Ronald S. Cook" <r...@westinis.com> schrieb:
>
[quoted text clipped - 11 lines]
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>

> (note that there was a huge difference
> between the two lines in VB6!).

Like the fact the first line won't compile (unless you changed it
to Dim p as Process: p = new Process)

Thanks,

Seth Rowe
Michel Posseth  [MCP] - 12 Apr 2007 19:00 GMT
and the set statement

Dim p as Process
set p = new Process

or is my memory now fooling with me ?

:-)

> On Apr 11, 4:56 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
> h...@gmx.at> wrote:
[quoted text clipped - 23 lines]
>
> Seth Rowe
rowe_newsgroups - 12 Apr 2007 23:37 GMT
> 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

> and the set statement
>
[quoted text clipped - 32 lines]
>
> > Seth Rowe

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.