What is the difference between creating a new instance using "new () and" .StartNew () "?

Based on my "answer" to the question "The stopwatch in the task seems additive for all tasks, you just need to measure the interval of the task"

What are the possible differences between creating a new Stopwatch instance like:

Stopwatch timer = System.Diagnostics.Stopwatch.StartNew();

with

Stopwatch timer = new Stopwatch();
timer.Start();  

Sub-query is implied:
Why was the method proposed StartNew()?

+5
source share
2 answers

StartNew, create a new instance of the stopwatch and run it.

Simple newis just a stopwatch instance. He does not start the Stopwatch.

, Start, Stopwatch.StartNew()

. .StartNew() - MSDN

"" .

StartNew .

+7

StartNew()?

. StartNew .

, StartNew factory API , .

+5

All Articles