Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Fixed smart quotes (dotnet#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
svick authored and guardrex committed May 14, 2017
1 parent a9cf528 commit fb4ce5d
Show file tree
Hide file tree
Showing 308 changed files with 633 additions and 633 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -378,7 +378,7 @@ Section 8 -- Interpretation.
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the Licensor. The text of the Creative Commons
will be considered the "Licensor." The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
Expand Down
2 changes: 1 addition & 1 deletion docs/core/migration/index.md
Expand Up @@ -57,7 +57,7 @@ See [A mapping between project.json and csproj properties](../tools/project-json

### Common issues

- If you get an error: No executable found matching command dotnet-migrate":
- If you get an error: "No executable found matching command dotnet-migrate":

Run `dotnet --version` to see which version you are using. [`dotnet migrate`](../tools/dotnet-migrate.md) requires .NET Core CLI RC3 or higher.
You’ll get this error if you have a *global.json* file in the current or parent directory and the `sdk` version is set to an older version.
Expand Down
8 changes: 4 additions & 4 deletions docs/core/tools/telemetry.md
Expand Up @@ -36,25 +36,25 @@ The `dotnet` command is used to launch both apps and the .NET Core Tools. The `d

## Behavior

The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, `export` on macOS/Linux, `set` on Windows) to true (for example, true, 1).
The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, `export` on macOS/Linux, `set` on Windows) to true (for example, "true", 1).

## Data Points

The feature collects the following pieces of data:

- The command being used (for example, build”, “restore)
- The command being used (for example, "build", "restore")
- The ExitCode of the command
- For test projects, the test runner being used
- The timestamp of invocation
- The framework used
- Whether runtime IDs are present in the runtimes node
- Whether runtime IDs are present in the "runtimes" node
- The CLI version being used

The feature will not collect any personal data, such as usernames or emails. It will not scan your code and not extract any project-level data that can be considered sensitive, such as name, repo or author (if you set those in your project.json). We want to know how the tools are used, not what you are building with the tools. If you find sensitive data being collected, that’s a bug. Please [file an issue](https://github.com/dotnet/cli/issues) and it will be fixed.

## License

The Microsoft distribution of .NET Core is licensed with the [MICROSOFT .NET LIBRARY EULA](https://aka.ms/dotnet-core-eula). This includes the DATA section re-printed below, to enable telemetry.
The Microsoft distribution of .NET Core is licensed with the [MICROSOFT .NET LIBRARY EULA](https://aka.ms/dotnet-core-eula). This includes the "DATA" section re-printed below, to enable telemetry.

[.NET NuGet packages](https://www.nuget.org/profiles/dotnetframework) use this same license but do not enable telemetry (see [Scope](#scope) above).

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/async.md
Expand Up @@ -224,7 +224,7 @@ Although async programming is relatively straightforward, there are some details

This is important to keep in mind. If `await` is not used in the body of an `async` method, the C# compiler will generate a warning, but the code will compile and run as if it were a normal method. Note that this would also be incredibly inefficient, as the state machine generated by the C# compiler for the async method would not be accomplishing anything.

* **You should add Async as the suffix of every async method name you write.**
* **You should add "Async" as the suffix of every async method name you write.**

This is the convention used in .NET to more-easily differentiate synchronous and asynchronous methods. Note that certain methods which aren’t explicitly called by your code (such as event handlers or web controller methods) don’t necessarily apply. Because these are not explicitly called by your code, being explicit about their naming isn’t as important.

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/language-reference/compiler-messages/cs0246.md
Expand Up @@ -63,7 +63,7 @@ The type or namespace name 'type/namespace' could not be found (are you missing

If you get this error in code that was previously working, first look for missing or unresolved references in Solution Explorer. Do you need to re-install a [NuGet](https://www.nuget.org/)package? For information about how the build system searches for references, see [Resolving file references in team build](http://blogs.msdn.com/b/manishagarwal/archive/2005/09/28/474769.aspx). If all references seem to be correct, look in your source control history to see what has changed in your .csproj file and/or your local source file.

If you haven’t successfully accessed the reference yet, use the Object Browser to inspect the assembly that is supposed to contain this namespace and verify that the namespace is present. If you verify with Object Browser that the assembly contains the namespace, try removing the using directive for the namespace and see what else breaks. The root problem may be with some other type in another assembly.
If you haven’t successfully accessed the reference yet, use the Object Browser to inspect the assembly that is supposed to contain this namespace and verify that the namespace is present. If you verify with Object Browser that the assembly contains the namespace, try removing the "using" directive for the namespace and see what else breaks. The root problem may be with some other type in another assembly.

The following example generates CS0246 because a necessary `using` directive is missing.

Expand Down
Expand Up @@ -70,17 +70,17 @@ There are three implicit type conversions from an interpolated string:

[!code-cs[interpolated-strings1](../../../../samples/snippets/csharp/language-reference/keywords/interpolated-strings1.cs#1)]

This is the final result of a string interpretation. All occurrences of double curly braces (“{{“ and “}}”) are converted to a single curly brace.
This is the final result of a string interpretation. All occurrences of double curly braces ("{{" and "}}") are converted to a single curly brace.

2. Conversion of an interpolated string to an <xref:System.IFormattable> variable that allows you create multiple result strings with culture-specific content from a single <xref:System.IFormattable> instance. This is useful for including such things as the correct numeric and date formats for individual cultures. All occurrences of double curly braces (“{{“ and “}}”) remain as double curly braces until you format the string by explicitly or implicitly calling the @System.Object.ToString method. All contained interpolation expressions are converted to {0}, {1}, and so on.
2. Conversion of an interpolated string to an <xref:System.IFormattable> variable that allows you create multiple result strings with culture-specific content from a single <xref:System.IFormattable> instance. This is useful for including such things as the correct numeric and date formats for individual cultures. All occurrences of double curly braces ("{{" and "}}") remain as double curly braces until you format the string by explicitly or implicitly calling the @System.Object.ToString method. All contained interpolation expressions are converted to {0}, {1}, and so on.

The following example uses reflection to display the members as well as the field and property values of an <xref:System.IFormattable> variable that is created from an interpolated string. It also passes the <xref:System.IFormattable> variable to the @System.Console(System.String) method.

[!code-cs[interpolated-strings2](../../../../samples/snippets/csharp/language-reference/keywords/interpolated-strings2.cs#1)]

Note that the interpolated string can be inspected only by using reflection. If it is passed to a string formatting method, such as @System.Console.WriteLine(System.String), its format items are resolved and the result string returned.

3. Conversion of an interpolated string to an <xref:System.FormattableString> variable that represents a composite format string. Inspecting the composite format string and how it renders as a result string might, for example, help you protect against an injection attack if you were building a query. <xref:System.FormattableString> also includes <xref:System.FormattableString.ToString> overloads that let you produce result strings for the @System.Globalization.InvariantCulture and @System.Globalization.CurrentCulture. All occurrences of double curly braces (“{{“ and “}}”) remain as double curly braces, until you format. All contained interpolation expressions are converted to {0}, {1}, and so on.
3. Conversion of an interpolated string to an <xref:System.FormattableString> variable that represents a composite format string. Inspecting the composite format string and how it renders as a result string might, for example, help you protect against an injection attack if you were building a query. <xref:System.FormattableString> also includes <xref:System.FormattableString.ToString> overloads that let you produce result strings for the @System.Globalization.InvariantCulture and @System.Globalization.CurrentCulture. All occurrences of double curly braces ("{{" and "}}") remain as double curly braces, until you format. All contained interpolation expressions are converted to {0}, {1}, and so on.

[!code-cs[interpolated-strings3](../../../../samples/snippets/csharp/language-reference/keywords/interpolated-strings3.cs#1)]

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/language-reference/keywords/try-catch.md
Expand Up @@ -64,7 +64,7 @@ catch (InvalidCastException e)
Using `catch` arguments is one way to filter for the exceptions you want to handle. You can also use a predicate expression that further examines the exception to decide whether to handle it. If the predicate expression returns false, then the search for a handler continues.

```csharp
catch (ArgumentException e) when (e.ParamName == “…”)
catch (ArgumentException e) when (e.ParamName == "")
{
}
```
Expand Down
Expand Up @@ -304,7 +304,7 @@ Length of the downloaded string: 33946.
Task<string> getStringTask = client.GetStringAsync("http://msdn.microsoft.com");
```

You can think of the task as a promise by `client.GetStringAsync` to produce an actual string eventually. In the meantime, if `AccessTheWebAsync` has work to do that doesn't depend on the promised string from `client.GetStringAsync`, that work can continue while `client.GetStringAsync` waits. In the example, the following lines of output, which are labeled "THREE, represent the opportunity to do independent work
You can think of the task as a promise by `client.GetStringAsync` to produce an actual string eventually. In the meantime, if `AccessTheWebAsync` has work to do that doesn't depend on the promised string from `client.GetStringAsync`, that work can continue while `client.GetStringAsync` waits. In the example, the following lines of output, which are labeled "THREE," represent the opportunity to do independent work

```
Expand Down
Expand Up @@ -69,7 +69,7 @@ namespace ConsoleApplication1
}
```

The `=>` operator has the same precedence as assignment (`=`) and is [right associative](../../../csharp/programming-guide/statements-expressions-operators/operators.md) (see Associativity section of the Operators article).
The `=>` operator has the same precedence as assignment (`=`) and is [right associative](../../../csharp/programming-guide/statements-expressions-operators/operators.md) (see "Associativity" section of the Operators article).

Lambdas are used in method-based [!INCLUDE[vbteclinq](../../../csharp/includes/vbteclinq_md.md)] queries as arguments to standard query operator methods such as <xref:System.Linq.Enumerable.Where%2A>.

Expand Down
Expand Up @@ -39,12 +39,12 @@ translation.priority.ht:
# How to: Convert a String to a Number (C# Programming Guide)
You can convert a [string](../../../csharp/language-reference/keywords/string.md) to a number by using methods in the <xref:System.Convert> class or by using the `TryParse` method found on the various numeric types (int, long, float, etc.).

If you have a string, it is slightly more efficient and straightforward to call a `TryParse` method (for example, `int.TryParse(“11”)`). Using a `Convert` method is more useful for general objects that implement <xref:System.IConvertible>.
If you have a string, it is slightly more efficient and straightforward to call a `TryParse` method (for example, `int.TryParse("11")`). Using a `Convert` method is more useful for general objects that implement <xref:System.IConvertible>.

You can use `Parse` or `TryParse` methods on the numeric type you expect the string contains, such as the <xref:System.Int32?displayProperty=fullName> type. The <xref:System.Convert.ToUInt32%2A?displayProperty=fullName> method uses <xref:System.Int32.Parse%2A> internally. If the string is not in a valid format, `Parse` throws an exception whereas `TryParse` returns [false](../../../csharp/language-reference/keywords/false.md).

## Example
The `Parse` and `TryParse` methods ignore whitespace at the beginning and at the end of the string, but all other characters must be characters that form the appropriate numeric type (int, long, ulong, float, decimal, etc.). Any whitespace within the characters that form the number cause an error. For example, you can use `decimal.TryParse` to parse “10”, “10.3”, “ 10 , but you cannot use this method to parse 10 from 10X”, “1 0 (note space), 10 .3 (note space), 10e1 (`float.TryParse` works here), and so on.
The `Parse` and `TryParse` methods ignore whitespace at the beginning and at the end of the string, but all other characters must be characters that form the appropriate numeric type (int, long, ulong, float, decimal, etc.). Any whitespace within the characters that form the number cause an error. For example, you can use `decimal.TryParse` to parse "10", "10.3", " 10 ", but you cannot use this method to parse 10 from "10X", "1 0" (note space), "10 .3" (note space), "10e1" (`float.TryParse` works here), and so on.

The examples below demonstrate both successful and unsuccessful calls to `Parse` and `TryParse`.

Expand Down
Expand Up @@ -52,7 +52,7 @@ public class MyClass{}

When you compile with the [/doc](../../../csharp/language-reference/compiler-options/doc-compiler-option.md) option, the compiler will search for all XML tags in the source code and create an XML documentation file. To create the final documentation based on the compiler-generated file, you can create a custom tool or use a tool such as [Sandcastle](http://go.microsoft.com/fwlink/?LinkId=124061).

To refer to XML elements (for example, your function processes specific XML elements that you want to describe in an XML documentation comment), you can use the standard quoting mechanism (`<` and `>`). To refer to generic identifiers in code reference (`cref`) elements, you can use either the escape characters (for example, `cref=List<T>`) or braces (`cref=List{T}`). As a special case, the compiler parses the braces as angle brackets to make the documentation comment less cumbersome to author when referring to generic identifiers.
To refer to XML elements (for example, your function processes specific XML elements that you want to describe in an XML documentation comment), you can use the standard quoting mechanism (`<` and `>`). To refer to generic identifiers in code reference (`cref`) elements, you can use either the escape characters (for example, `cref="List<T>"`) or braces (`cref="List{T}"`). As a special case, the compiler parses the braces as angle brackets to make the documentation comment less cumbersome to author when referring to generic identifiers.

> [!NOTE]
> The XML documentation comments are not metadata; they are not included in the compiled assembly and therefore they are not accessible through reflection.
Expand Down

0 comments on commit fb4ce5d

Please sign in to comment.