dotnet / dotnet/dotnet-api-docs

What is the practical difference between Restart and StartNew?

Open
#1,336 0 comments 0 reactions 0 assignees View on GitHub
area-System.Diagnostics dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

I know StartNew will create a new instance, but asides from that... what is the practical differences? When should we prefer one over another?

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: d48a4ddc-85a4-cf73-4408-8e8b4149f44d
* Version Independent ID: f761e56a-8291-f3b0-6161-8b8aee46eec8
* Content: [Stopwatch.Restart Method (System.Diagnostics)](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.stopwatch.restart?view=netframework-4.7.2)
* Content Source: [xml/System.Diagnostics/Stopwatch.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Diagnostics/Stopwatch.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.