Skip to content

Commit befff34

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/visualstudio-docs-pr (branch live)
2 parents a6e669a + 6c3aa85 commit befff34

23 files changed

+101
-41
lines changed

docs/ide/reference/convert-anonymous-type-to-class.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Convert Anonymous Type to Class
3-
ms.date: 02/13/2019
3+
ms.date: 03/10/2020
44
ms.topic: reference
5-
author: kendrahavens
6-
ms.author: kehavens
5+
author: mikadumont
6+
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- "dotnet"
1213
---
@@ -16,6 +17,8 @@ This refactoring applies to:
1617

1718
- C#
1819

20+
- Visual Basic
21+
1922
**What:** Convert an anonymous type to class.
2023

2124
**When:** You have an anonymous type that you want to continue to build on in a class.

docs/ide/reference/convert-anonymous-type-to-tuple.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Convert Anonymous Type to Tuple
3-
ms.date: 02/13/2019
3+
ms.date: 03/10/2020
44
ms.topic: reference
5-
author: kendrahavens
6-
ms.author: kehavens
5+
author: mikadumont
6+
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- "dotnet"
1213
---
@@ -16,6 +17,8 @@ This refactoring applies to:
1617

1718
- C#
1819

20+
- Visual Basic
21+
1922
**What:** Convert an anonymous type to tuple.
2023

2124
**When:** You have an anonymous type that qualifies as a tuple.

docs/ide/reference/convert-for-loop-to-foreach.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Refactor code to convert a for loop to a foreach statement
3-
ms.date: 05/10/2018
3+
ms.date: 03/10/2020
44
ms.topic: reference
5-
author: TerryGLee
6-
ms.author: tglee
5+
author: mikadumont
6+
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- dotnet
1213
---
@@ -22,6 +23,8 @@ This refactoring applies to:
2223

2324
- C#
2425

26+
- Visual Basic
27+
2528
> [!NOTE]
2629
> The **Convert to foreach** Quick Action refactoring is only available for [for](/dotnet/csharp/language-reference/keywords/for) loops that contain all three parts: an initializer, condition, and iterator.
2730

docs/ide/reference/convert-foreach-linq.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
22
title: Convert a foreach loop to LINQ
33
descritpion: Convert any foreach loop that uses an IEnumerable to a LINQ query or a LINQ call form (also known as a LINQ method).
4-
ms.date: 02/20/2019
4+
ms.date: 03/10/2020
55
ms.topic: reference
6-
author: kendrahavens
7-
ms.author: kehavens
6+
author: mikadumont
7+
ms.author: midumont
88
manager: jillfra
99
dev_langs:
1010
- CSharp
11+
- VB
1112
ms.workload:
1213
- "dotnet"
1314
---
@@ -17,6 +18,8 @@ This refactoring applies to:
1718

1819
- C#
1920

21+
- Visual Basic
22+
2023
**What:** Lets you easily convert your *foreach* loop that uses an IEnumerable to a LINQ query or a LINQ call form (also known as a LINQ method).
2124

2225
**When:** You have a foreach loop that uses an IEnumerable, and you want that loop to read as a LINQ query.

docs/ide/reference/convert-get-method-to-property.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
22
title: Convert Get method to property; convert property to Get method
3-
ms.date: 01/26/2018
3+
ms.date: 03/10/2020
44
ms.topic: reference
55
ms.devlang: csharp
6-
author: TerryGLee
7-
ms.author: tglee
6+
author: mikadumont
7+
ms.author: midumont
88
manager: jillfra
99
f1_keywords:
1010
- vs.csharp.refactoring.convertmethodtoproperty
1111
dev_langs:
1212
- CSharp
13+
- VB
1314
ms.workload:
1415
- dotnet
1516
---
@@ -19,6 +20,8 @@ These refactorings apply to:
1920

2021
- C#
2122

23+
- Visual Basic
24+
2225
## Convert Get method to property
2326

2427
**What:** Lets you convert a Get method into a property (and optionally your Set method).

docs/ide/reference/convert-if-statement-to-switch-statement-or-switch-expression.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Convert if statement to switch statement or switch expression
3-
ms.date: 02/12/2020
3+
ms.date: 03/10/2020
44
ms.topic: reference
55
author: mikadumont
66
ms.author: midumont
@@ -26,9 +26,15 @@ This refactoring applies to:
2626

2727
1. Place your cursor in the `if` keyword.
2828
2. Press **Ctrl**+**.** to trigger the **Quick Actions and Refactorings** menu.
29-
3. Select **Convert to 'switch' statement**.
29+
3. Select from the following two options:
3030

31-
![Convert if statement to switch statement or switch expression](media/convert-if-statement-to-switch-statement-or-switch-expression.png)
31+
Select **Convert to 'switch' statement**.
32+
33+
![Convert if statement to switch statement](media/convert-if-to-switch-statement.png)
34+
35+
Select **Convert to 'switch' expression**.
36+
37+
![Convert if statement to switch expression](media/convert-if-to-switch-expression.png)
3238

3339
## See also
3440

docs/ide/reference/convert-linq-to-foreach.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
22
title: Refactor code to convert a LINQ query to a foreach statement
33
description: Convert any LINQ query written in query syntax to a foreach statement.
4-
ms.date: 05/15/2018
4+
ms.date: 03/10/2020
55
ms.topic: reference
6-
author: TerryGLee
7-
ms.author: tglee
6+
author: mikadumont
7+
ms.author: midumont
88
manager: jillfra
99
dev_langs:
1010
- CSharp
11+
- VB
1112
ms.workload:
1213
- dotnet
1314
---
@@ -19,6 +20,8 @@ This refactoring applies to:
1920

2021
- C#
2122

23+
- Visual Basic
24+
2225
## How to use it
2326

2427
1. Select the entire LINQ query starting with `from`.

docs/ide/reference/generate-parameter.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Generate parameter refactoring
3-
ms.date: 06/19/2019
3+
ms.date: 03/10/2020
44
ms.topic: reference
55
author: mikadumont
66
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- "dotnet"
1213
---
@@ -16,6 +17,8 @@ This refactoring applies to:
1617

1718
- C#
1819

20+
- Visual Basic
21+
1922
**What:** Automatically generates a method parameter.
2023

2124
**When:** You reference a variable in a method that doesn't exist in the current context and receive an error; you can generate a parameter as a code fix.

docs/ide/reference/generate-private-field-from-constructor.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Generate private field from constructor
3-
ms.date: 02/19/2020
3+
ms.date: 03/10/2020
44
ms.topic: reference
55
author: mikadumont
66
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- "dotnet"
1213
---
@@ -16,6 +17,8 @@ This refactoring applies to:
1617

1718
- C#
1819

20+
- Visual Basic
21+
1922
**What:** Generate a private field from a constructor.
2023

2124
**When:** You want to quickly add a private field from a constructor.

docs/ide/reference/generate-usings.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Generate usings
3-
ms.date: 02/19/2019
3+
ms.date: 03/10/2020
44
ms.topic: reference
5-
author: kendrahavens
6-
ms.author: kehavens
5+
author: mikadumont
6+
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- "dotnet"
1213
helpviewer_keywords:
@@ -18,6 +19,8 @@ This code generation applies to:
1819

1920
- C#
2021

22+
- Visual Basic
23+
2124
**What:** Lets you immediately add the necessary imports or [using directives](/dotnet/csharp/language-reference/keywords/using-directive) for copy-and-pasted code.
2225

2326
**When:** It's common practice to copy code from different places in your project or other sources and paste it in to new code. This Quick Action finds missing imports directives for copy-and-pasted code and then prompts you to add them. This code fix can also add references from project to project.

docs/ide/reference/intellisense-completion-unimported-types.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
title: IntelliSense completion for unimported types
33
description: How to use IntelliSense completion for types that you haven't imported yet with a `using` directive.
4-
ms.date: 06/20/2019
4+
ms.date: 03/10/2020
55
ms.topic: reference
66
author: mikadumont
77
ms.author: midumont
88
manager: jillfra
99
dev_langs:
1010
- CSharp
11+
- VB
12+
1113
ms.workload:
1214
- "dotnet"
1315
---
@@ -17,6 +19,8 @@ This refactoring applies to:
1719

1820
- C#
1921

22+
- Visual Basic
23+
2024
**What:** IntelliSense gives completion for unimported types.
2125

2226
**When:** You want to add a type that already has a dependency in your project but the import statement has not yet been added to your file.
Loading
Loading

docs/ide/reference/move-declaration-near-reference.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Move variable declaration near reference
3-
ms.date: 01/26/2018
3+
ms.date: 03/10/2020
44
ms.topic: reference
5-
author: TerryGLee
6-
ms.author: tglee
5+
author: mikadumont
6+
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- dotnet
1213
---
@@ -16,6 +17,8 @@ This refactoring applies to:
1617

1718
- C#
1819

20+
- Visual Basic
21+
1922
**What:** Lets you move variable declarations closer to their usage.
2023

2124
**When:** You have variable declarations that can be in a narrower scope.

docs/ide/reference/regex-completion-through-intellisense.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Regex completion through IntelliSense menu
3-
ms.date: 06/10/2019
3+
ms.date: 03/10/2020
44
ms.topic: reference
55
author: mikadumont
66
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- "dotnet"
1213
---
@@ -16,6 +17,8 @@ This refactoring applies to:
1617

1718
- C#
1819

20+
- Visual Basic
21+
1922
**What:** Regular expression (regex) completion through IntelliSense menu.
2023

2124
**When:** You want to write a regular expression with help from IntelliSense. IntelliSense gives you basic completion and an explanation as to what each of the regex characters mean.

docs/ide/reference/remove-unreachable-code.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Remove unreachable code refactoring
3-
ms.date: 01/26/2018
3+
ms.date: 03/10/2020
44
ms.topic: reference
5-
author: TerryGLee
6-
ms.author: tglee
5+
author: mikadumont
6+
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- dotnet
1213
---
@@ -16,6 +17,8 @@ This refactoring applies to:
1617

1718
- C#
1819

20+
- Visual Basic
21+
1922
**What:** Removes code that will never be executed.
2023

2124
**When:** Your program has no path to a code snippet, making that code snippet unnecessary.

docs/ide/reference/simplify-string-interpolation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: Simplify string interpolation
3-
ms.date: 02/12/2020
3+
ms.date: 03/10/2020
44
ms.topic: reference
55
author: mikadumont
66
ms.author: midumont
77
manager: jillfra
88
dev_langs:
99
- CSharp
10+
- VB
1011
ms.workload:
1112
- "dotnet"
1213
---
@@ -16,6 +17,8 @@ This refactoring applies to:
1617

1718
- C#
1819

20+
- Visual Basic
21+
1922
**What:** Lets you simplify a [string interpolation](https://docs.microsoft.com/dotnet/csharp/tutorials/string-interpolation).
2023

2124
**When:** You have a string interpolation that can be simplified.

0 commit comments

Comments
 (0)