473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

Is there a difference between these two lines?

Dim p As Process = New Process()

Dim p As New Process()
Thanks,
Ron
Apr 11 '07 #1
6 5414
On Apr 11, 10:55 am, "Ronald S. Cook" <r...@westinis.comwrote:
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

Apr 11 '07 #2
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" <rc***@westinis.comschreef in bericht
news:e1**************@TK2MSFTNGP06.phx.gbl...
Is there a difference between these two lines?

Dim p As Process = New Process()

Dim p As New Process()
Thanks,
Ron

Apr 11 '07 #3
"Ronald S. Cook" <rc***@westinis.comschrieb:
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 S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Apr 11 '07 #4
On Apr 11, 4:56 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrote:
"Ronald S. Cook" <r...@westinis.comschrieb:
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 S Herfried K. Wagner
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

Apr 12 '07 #5

and the set statement

Dim p as Process
set p = new Process

or is my memory now fooling with me ?
:-)

"rowe_newsgroups" <ro********@yahoo.comschreef in bericht
news:11*********************@p77g2000hsh.googlegro ups.com...
On Apr 11, 4:56 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrote:
>"Ronald S. Cook" <r...@westinis.comschrieb:
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 S Herfried K. Wagner
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

Apr 12 '07 #6
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
On Apr 12, 2:00 pm, "Michel Posseth [MCP]" <M...@posseth.comwrote:
and the set statement

Dim p as Process
set p = new Process

or is my memory now fooling with me ?

:-)

"rowe_newsgroups" <rowe_em...@yahoo.comschreef in berichtnews:11*********************@p77g2000hsh.go oglegroups.com...
On Apr 11, 4:56 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrote:
"Ronald S. Cook" <r...@westinis.comschrieb:
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 S Herfried K. Wagner
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

Apr 12 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter Åstrand | last post by:
There's a new PEP available: PEP 324: popen5 - New POSIX process module A copy is included below. Comments are appreciated. ---- PEP: 324 Title: popen5 - New POSIX process module
11
by: Mike M | last post by:
Is it possible? In the parent process, I have a socket that binds, listens and then accepts new connections (which creates new sockets in the process). I want to be able to pass some of these new...
6
by: Michael J. Moore | last post by:
Is it the listener process, or some other Oracle process. Also, on a UNIX system, when you do "ps -ef" to see your processes, the PPID points back to a process named "init". Why does the PPID not...
12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
77
by: Charles Law | last post by:
Hi guys I have a time critical process, running on a worker thread. By "time critical", I mean that certain parts of the process must be completed in a specific time frame. The time when the...
6
by: Dmitri Shvetsov | last post by:
Hi, Can I start an external process from the Web Service? I'm using a code, compiler keeps silence, compiles ok and starts the project. When I trace in Debugger it doesn't start an external...
10
by: Sorin Dolha [MCSD .NET] | last post by:
I would like to start a process from C# code as another user. The C# code is executed as the ASPNET user because it relies in a Web Page class, and I would like that the process will run as another...
5
by: GTS | last post by:
Hi All, I am spawning a process from a service. The spawned process hungs for various reasons, (corrupted data, deadlock). I am expecting the process has to complete the task with in the...
11
by: Jon Davis | last post by:
Does anyone know why using System.Diagnostics.Process to "wrap" a console application does not always transmit the I/O, depending on what processes you're trying to "consume"? PowerShell, for...
4
by: =?Utf-8?B?U3Jhag==?= | last post by:
There is a process A that launches process B as a COM object. If the User tries to end process A, process B should also end. But vice versa is not true. Process A can run independant of process. It...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.