Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/core/tools/csproj.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ The following example specifies the fallbacks only for the `netcoreapp2.1` targe
```

## NuGet metadata properties
With the move to MSbuild, we have moved the input metadata that is used when packing a NuGet package from *project.json* to *.csproj* files. The inputs are MSBuild properties so they have to go within a `<PropertyGroup>` group. The following is the list of properties that are used as inputs to the packing process when using the `dotnet pack` command or the `Pack` MSBuild target that is part of the SDK.
With the move to MSBuild, we have moved the input metadata that is used when packing a NuGet package from *project.json* to *.csproj* files. The inputs are MSBuild properties so they have to go within a `<PropertyGroup>` group. The following is the list of properties that are used as inputs to the packing process when using the `dotnet pack` command or the `Pack` MSBuild target that is part of the SDK.

### IsPackable
A Boolean value that specifies whether the project can be packed. The default value is `true`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ms.assetid: 7ec09480-5612-4f6a-8d00-ad90ea9bca5d
---
# How to: Set Environment Variables for the Visual Studio Command Line

The VsDevCmd.bat file sets the appropriate environment variables to enable command-line builds. For more information about VsDevCmd.bat, see [Knowledge Base article Q248802](https://support.microsoft.com/help/248802/you-receive-the-out-of-environment-space-error-message-when-you-execut).
The VsDevCmd.bat file sets the appropriate environment variables to enable command-line builds.

> [!NOTE]
> The VsDevCmd.bat file is a new file delivered with Visual Studio 2017. Visual Studio 2015 and earlier versions used VSVARS32.bat for the same purpose. This file was stored in \Program Files\Microsoft Visual Studio\\*Version*\Common7\Tools or Program Files (x86)\Microsoft Visual Studio\\*Version*\Common7\Tools.
Expand All @@ -35,7 +35,14 @@ If the current version of Visual Studio is installed on a computer that also has

> [!CAUTION]
> VsDevCmd.bat can vary from computer to computer. Do not replace a missing or damaged VsDevCmd.bat file with a VsDevCmd.bat from another computer. Instead, rerun setup to replace the missing file.


### Available options for VsDevCmd.BAT

To see the available options for VsDevCmd.BAT, run the command with the `-help` option:
```console
VsDevCmd.bat -help
```

## See Also

- [Command-line Building With csc.exe](../../../csharp/language-reference/compiler-options/command-line-building-with-csc-exe.md)
2 changes: 1 addition & 1 deletion docs/csharp/language-reference/keywords/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Accessing private members of `Child` from `Main` would only be possible if `Main

Types declared inside a class without an access modifier default to `private`, so the data members in this example would still be `private` if the keyword were removed.

Finally, notice that for the object created using the default constructor (`child3`), the age field was initialized to zero by default.
Finally, notice that for the object created using the default constructor (`child3`), the `age` field was initialized to zero by default.

## C# language specification

Expand Down
3 changes: 2 additions & 1 deletion docs/csharp/language-reference/keywords/delegate.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ The delegate must be instantiated with a method or lambda expression that has a
- [Reference Types](../../../csharp/language-reference/keywords/reference-types.md)
- [Delegates](../../../csharp/programming-guide/delegates/index.md)
- [Events](../../../csharp/programming-guide/events/index.md)
- [Delegates with Named vs. Anonymous Methods](../../../csharp/programming-guide/delegates/delegates-with-named-vs-anonymous-methods.md)
- [Delegates with Named vs. Anonymous Methods](../../../csharp/programming-guide/delegates/delegates-with-named-vs-anonymous-methods.md)
- [Anonymous Methods](../../../csharp/programming-guide/statements-expressions-operators/anonymous-methods.md)
- [Lambda Expressions](../../../csharp/programming-guide/statements-expressions-operators/lambda-expressions.md)
12 changes: 12 additions & 0 deletions docs/csharp/language-reference/keywords/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ string str = "test";
char x = str[2]; // x = 's';
```

In similar fashion, the [] operator can also be used for iterating over each character in a `string`:

```csharp
string str = "test";

for (int i = 0; i < str.Length; i++)
{
Console.Write(str[i] + " ");
}
// Output: t e s t
```

String literals are of type `string` and can be written in two forms, quoted and @-quoted. Quoted string literals are enclosed in double quotation marks ("):

```csharp
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: "/= Operator - C# Reference"
ms.custom: seodec18

ms.date: 07/20/2015
ms.date: 12/13/2018
f1_keywords:
- "/=_CSharpKeyword"
helpviewer_keywords:
Expand All @@ -11,30 +10,39 @@ helpviewer_keywords:
ms.assetid: 50fc02b0-ee9c-4c3e-b58d-d591282caf1c
---
# /= Operator (C# Reference)
The division assignment operator.

## Remarks
An expression using the `/=` assignment operator, such as

```csharp
x /= y
```

is equivalent to

```csharp
x = x / y
```

except that `x` is only evaluated once. The [/ operator](../../../csharp/language-reference/operators/division-operator.md) is predefined for numeric types to perform division.

The `/=` operator cannot be overloaded directly, but user-defined types can overload the [/ operator](../../../csharp/language-reference/operators/division-operator.md) (see [operator](../../../csharp/language-reference/keywords/operator.md)). On all compound assignment operators, overloading the binary operator implicitly overloads the equivalent compound assignment.

## Example
[!code-csharp[csRefOperators#5](codesnippet/CSharp/division-assignment-operator_1.cs)]

## See Also

- [C# Reference](../../../csharp/language-reference/index.md)
- [C# Programming Guide](../../../csharp/programming-guide/index.md)
- [C# Operators](../../../csharp/language-reference/operators/index.md)

The division assignment operator.

An expression using the `/=` operator, such as

```csharp
x /= y
```

is equivalent to

```csharp
x = x / y
```

except that `x` is only evaluated once.

The [division operator](division-operator.md) `/` divides its first operand by its second operand. It's supported by all numeric types.

The following example demonstrates the usage of the `/=` operator:

[!code-csharp-interactive[divide and assign](~/samples/snippets/csharp/language-reference/operators/DivisionExamples.cs#DivisionAssignment)]

## Operator overloadability

If a user-defined type [overloads](../keywords/operator.md) the [division operator](division-operator.md) `/`, the division assignment operator `/=` is implicitly overloaded. A user-defined type cannot explicitly overload the division assignment operator.

## C# language specification

For more information, see the [Compound assignment](~/_csharplang/spec/expressions.md#compound-assignment) section of the [C# language specification](../language-specification/index.md).

## See also

- [C# Reference](../index.md)
- [C# Programming Guide](../../programming-guide/index.md)
- [C# Operators](index.md)
57 changes: 36 additions & 21 deletions docs/csharp/language-reference/operators/division-operator.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: "/ Operator - C# Reference"
ms.custom: seodec18

ms.date: 04/04/2018
ms.date: 12/13/2018
f1_keywords:
- "/_CSharpKeyword"
helpviewer_keywords:
Expand All @@ -11,22 +10,38 @@ helpviewer_keywords:
ms.assetid: d155e496-678f-4efa-bebe-2bd08da2c5af
---
# / Operator (C# Reference)
The division operator (`/`) divides its first operand by its second operand. All numeric types have predefined division operators.

## Remarks
User-defined types can overload the `/` operator (see [operator](../../../csharp/language-reference/keywords/operator.md)). An overload of the `/` operator implicitly overloads the [/= operator](division-assignment-operator.md).

When you divide two integers, the result is always an integer. For example, the result of 7 / 3 is 2. This is not to be confused with floored division, as the `/` operator rounds towards zero: -7 / 3 is -2.

To obtain a quotient as a rational number, use the `float`, `double`, or `decimal` types. There are many ways to convert between [built in numeric types](../../../csharp/language-reference/keywords/reference-tables-for-types.md).

To determine the remainder, use the [remainder operator](../../../csharp/language-reference/operators/remainder-operator.md) `%`.

## Example
[!code-csharp[csRefOperators#42](../../../csharp/language-reference/operators/codesnippet/CSharp/division-operator_1.cs)]

## See Also

- [C# Reference](../../../csharp/language-reference/index.md)
- [C# Programming Guide](../../../csharp/programming-guide/index.md)
- [C# Operators](../../../csharp/language-reference/operators/index.md)

The division operator `/` divides its first operand by its second operand. All numeric types support the division operator.

## Integer division

For the operands of integer types, the result of the `/` operator is of an integer type and equals the quotient of the two operands rounded towards zero:

[!code-csharp-interactive[integer division](~/samples/snippets/csharp/language-reference/operators/DivisionExamples.cs#Integer)]

To obtain the quotient of the two operands as a floating-point number, use the `float`, `double`, or `decimal` type:

[!code-csharp-interactive[integer as floating-point division](~/samples/snippets/csharp/language-reference/operators/DivisionExamples.cs#IntegerAsFloatingPoint)]

## Floating-point division

For the `float`, `double`, and `decimal` types, the result of the `/` operator is the quotient of the two operands:

[!code-csharp-interactive[floating-point division](~/samples/snippets/csharp/language-reference/operators/DivisionExamples.cs#FloatingPoint)]

If one of the operands is `decimal`, another operand can be neither `float` nor `double`, because neither `float` nor `double` is implicitly convertible to `decimal`. You must explicitly convert the `float` or `double` operand to the `decimal` type. For more information about implicit conversions between numeric types, see [Implicit numeric conversions table](../keywords/implicit-numeric-conversions-table.md).

## Operator overloadability

User-defined types can [overload](../keywords/operator.md) the `/` operator. When the `/` operator is overloaded, the [division assignment operator](division-assignment-operator.md) `/=` is also implicitly overloaded.

## C# language specification

For more information, see the [Division operator](~/_csharplang/spec/expressions.md#division-operator) section of the [C# language specification](../language-specification/index.md).

## See also

- [C# Reference](../index.md)
- [C# Programming Guide](../../programming-guide/index.md)
- [C# Operators](index.md)
- [% Operator](remainder-operator.md)
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ Polymorphism is often referred to as the third pillar of object-oriented program

## See Also

- [C# Programming Guide](../../../csharp/programming-guide/index.md)
- [C# Programming Guide](../../../csharp/programming-guide/index.md)
- [C# Programming Guide](../../../csharp/programming-guide/index.md)
- [Inheritance](../../../csharp/programming-guide/classes-and-structs/inheritance.md)
- [Abstract and Sealed Classes and Class Members](../../../csharp/programming-guide/classes-and-structs/abstract-and-sealed-classes-and-class-members.md)
- [Methods](../../../csharp/programming-guide/classes-and-structs/methods.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/wcf/fundamental-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This document provides a high-level view of the Windows Communication Foundation
A construct that exposes one or more endpoints, with each endpoint exposing one or more service operations.

endpoint
A construct at which messages are sent or received (or both). It comprises a location (an address) that defines where messages can be sent, a specification of the communication mechanism (a binding) that described how messages should be sent, and a definition for a set of messages that can be sent or received (or both) at that location (a service contract) that describes what message can be sent.
A construct at which messages are sent or received (or both). It comprises a location (an address) that defines where messages can be sent, a specification of the communication mechanism (a binding) that describes how messages should be sent, and a definition for a set of messages that can be sent or received (or both) at that location (a service contract) that describes what message can be sent.

A WCF service is exposed to the world as a collection of endpoints.

Expand Down
Loading