Skip to content

Commit 2a76bb0

Browse files
Merge pull request #33 from MicrosoftDocs/master
bringing in newest changes
2 parents b091dc1 + aab6e5f commit 2a76bb0

File tree

228 files changed

+2805
-1917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+2805
-1917
lines changed

.openpublishing.redirection.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,11 @@
15701570
"redirect_url": "/visualstudio/extensibility/walkthrough-creating-a-basic-isolated-shell-application",
15711571
"redirect_document_id": false
15721572
},
1573+
{
1574+
"source_path": "docs/get-started/csharp/tutorial-projects-solutions.md",
1575+
"redirect_url": "/visualstudio/get-started/tutorial-projects-solutions",
1576+
"redirect_document_id": false
1577+
},
15731578
{
15741579
"source_path": "docs/ide/how-to-target-a-version-of-the-dotnet-framework.md",
15751580
"redirect_url": "/visualstudio/ide/visual-studio-multi-targeting-overview",
@@ -7879,6 +7884,61 @@
78797884
"source_path": "subscriptions/vs-xamarin.md",
78807885
"redirect_url": "/visualstudio/subscriptions",
78817886
"redirect_document_id": false
7887+
},
7888+
{
7889+
"source_path": "subscriptions/signing-in.md",
7890+
"redirect_url": "/visualstudio/subscriptions",
7891+
"redirect_document_id": false
7892+
},
7893+
{
7894+
"source_path": "subscriptions/subscriber-downloads.md",
7895+
"redirect_url": "/visualstudio/subscriptions",
7896+
"redirect_document_id": false
7897+
},
7898+
{
7899+
"source_path": "subscriptions/subscriber-benefits.md",
7900+
"redirect_url": "/visualstudio/subscriptions",
7901+
"redirect_document_id": false
7902+
},
7903+
{
7904+
"source_path": "subscriptions/join-dev-essentials.md",
7905+
"redirect_url": "/visualstudio/subscriptions",
7906+
"redirect_document_id": false
7907+
},
7908+
{
7909+
"source_path": "subscriptions/professional-development.md",
7910+
"redirect_url": "/visualstudio/subscriptions",
7911+
"redirect_document_id": false
7912+
},
7913+
{
7914+
"source_path": "subscriptions/technical-support.md",
7915+
"redirect_url": "/visualstudio/subscriptions",
7916+
"redirect_document_id": false
7917+
},
7918+
{
7919+
"source_path": "subscriptions/subscription-management-info.md",
7920+
"redirect_url": "/visualstudio/subscriptions",
7921+
"redirect_document_id": false
7922+
},
7923+
{
7924+
"source_path": "subscriptions/vlsc-admin-faq.md",
7925+
"redirect_url": "/visualstudio/subscriptions",
7926+
"redirect_document_id": false
7927+
},
7928+
{
7929+
"source_path": "subscriptions/find-pcn.md",
7930+
"redirect_url": "/visualstudio/subscriptions",
7931+
"redirect_document_id": false
7932+
},
7933+
{
7934+
"source_path": "subscriptions/find-primary-contact.md",
7935+
"redirect_url": "/visualstudio/subscriptions",
7936+
"redirect_document_id": false
7937+
},
7938+
{
7939+
"source_path": "subscriptions/volume-license-onboarding-email.md",
7940+
"redirect_url": "/visualstudio/subscriptions",
7941+
"redirect_document_id": false
78827942
}
78837943
]
78847944
}

docs/code-quality/c26478.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: c26478
3+
keywords: c26478
4+
author: JordanMaples
5+
ms.author: jomaples
6+
ms.date: 07/15/2019
7+
ms.topic: reference
8+
ms.technology: vs-ide-code-analysis
9+
f1_keywords:
10+
- "c26478"
11+
helpviewer_keywords:
12+
- "c26478"
13+
dev_langs: ["C++"]
14+
manager: annagrin
15+
---
16+
# Warning C26478: Don't use std::move on constant variables. (es.56)
17+
18+
This warning is to indicate that the use of std::move not consistent with how std::move is intended to be used.
19+
20+
When called on a const object, std::move returns a copy of the object, which is likely not the developer's intent.
21+
22+
## Example 1
23+
24+
```cpp
25+
struct node
26+
{
27+
node* next;
28+
int id;
29+
}
30+
31+
void foo(const node& n)
32+
{
33+
const node local = std::move(n); // C26478 reported here
34+
// ...
35+
}
36+
```
37+
38+
An assignment operator or using the passed in parameter will prevent this warning from being issued and will adequately serve the developer's use case.
39+
40+
## Example 2
41+
42+
```cpp
43+
struct s;
44+
45+
template <typename T>
46+
void bar(T t){};
47+
48+
void foo()
49+
{
50+
const s s1;
51+
bar(std::move(s1)); // C26478 reported here
52+
}
53+
```
54+
55+
## See also
56+
[ES.56 - Write std::move() only when you need to explicitly move an object to another scope](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es56-write-stdmove-only-when-you-need-to-explicitly-move-an-object-to-another-scope)

docs/code-quality/c26812.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: c26812
3+
keywords: c26812
4+
author: JordanMaples
5+
ms.author: jomaples
6+
ms.date: 07/15/2019
7+
ms.topic: reference
8+
ms.technology: vs-ide-code-analysis
9+
f1_keywords:
10+
- "c26812"
11+
helpviewer_keywords:
12+
- "c26812"
13+
dev_langs: ["C++"]
14+
manager: annagrin
15+
---
16+
17+
# Warning C26812 Prefer 'enum class' over 'enum' (Enum.3)
18+
The enum type %type% is unscoped. Prefer 'enum class' over 'enum' (Enum.3)
19+
20+
## Example
21+
The following example is from the C++ Core Guidelines
22+
23+
```cpp
24+
void Print_color(int color);
25+
26+
enum Web_color { red = 0xFF0000, green = 0x00FF00, blue = 0x0000FF }; // C26812 reported here
27+
enum Product_info { Red = 0, Purple = 1, Blue = 2 }; // C26812 reported here
28+
29+
Web_color webby = Web_color::blue;
30+
31+
// Clearly at least one of these calls is buggy.
32+
Print_color(webby);
33+
Print_color(Product_info::Blue);
34+
```
35+
36+
These warnings are corrected by declaring the enum as enum class:
37+
38+
```cpp
39+
void Print_color(int color);
40+
41+
enum class Web_color { red = 0xFF0000, green = 0x00FF00, blue = 0x0000FF }; // no C26812
42+
enum class Product_info { red = 0, purple = 1, blue = 2 }; // no C26812
43+
44+
Web_color webby = Web_color::blue;
45+
Print_color(webby); // Error: cannot convert Web_color to int.
46+
Print_color(Product_info::Red); // Error: cannot convert Product_info to int.
47+
```
48+
49+
## See also
50+
51+
[Enum.3 Prefer enum class over enum](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#enum3-prefer-class-enums-over-plain-enums )

docs/code-quality/c26814.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: c26814
3+
keywords: c26814
4+
author: JordanMaples
5+
ms.author: jomaples
6+
ms.date: 07/15/2019
7+
ms.topic: reference
8+
ms.technology: vs-ide-code-analysis
9+
f1_keywords:
10+
- "c26814"
11+
helpviewer_keywords:
12+
- "c26814"
13+
dev_langs: ["C++"]
14+
manager: annagrin
15+
---
16+
17+
# Warning C26814 Use constexpr for constants whose value is known at compile time. (Con.5)
18+
The const variable '%variable%' can be computed at compile time. Consider using constexpr (con.5)
19+
20+
## Example
21+
```cpp
22+
const int foo = 1234; // C26814 reported here.
23+
constexpr int getMagicNumber()
24+
{
25+
return 42;
26+
}
27+
28+
void bar()
29+
{
30+
const int myval = 3; // C26814 reported here
31+
const int magicNumber = getMagicNumber(); // C26814 reported here.
32+
}
33+
```
34+
35+
## See also
36+
[Con.5 Use constexpr for all variables that can be computed at compile time](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rconst-constexpr)

docs/code-quality/ca2202-do-not-dispose-objects-multiple-times.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "CA2202: Do not dispose objects multiple times"
3-
ms.date: 11/04/2016
3+
ms.date: 07/16/2019
44
ms.topic: reference
55
f1_keywords:
66
- "CA2202"
@@ -77,11 +77,13 @@ try
7777
}
7878
finally
7979
{
80-
if(stream != null)
81-
stream.Dispose();
80+
stream?.Dispose();
8281
}
8382
```
8483

84+
> [!TIP]
85+
> The `?.` syntax above is the [null-conditional operator](/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and-).
86+
8587
## See also
8688

8789
- <xref:System.IDisposable?displayProperty=fullName>

docs/code-quality/configure-fxcop-analyzers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,4 @@ The syntax for configuring an option for a specific rule is as follows:
118118

119119
- [Analyzer configuration](https://github.com/dotnet/roslyn-analyzers/blob/master/docs/Analyzer%20Configuration.md)
120120
- [FxCop analyzers](install-fxcop-analyzers.md)
121+
- [.NET coding conventions for EditorConfig](../ide/editorconfig-code-style-settings-reference.md)

docs/code-quality/toc.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
- name: Create a custom rule set
147147
href: how-to-create-a-custom-rule-set.md
148148
- name: Use the rule set editor
149-
href: working-in-the-code-analysis-rule-set-editor.md
149+
href: working-in-the-code-analysis-rule-set-editor.md
150150
- name: Code metrics
151151
items:
152152
- name: Overview
@@ -956,6 +956,8 @@
956956
href: C26476.md
957957
- name: C26477
958958
href: C26477.md
959+
- name: C26478
960+
href: c26478.md
959961
- name: C26481
960962
href: C26481.md
961963
- name: C26482
@@ -990,6 +992,10 @@
990992
href: C26497.md
991993
- name: C26498
992994
href: C26498.md
995+
- name: C26812
996+
href: c26812.md
997+
- name: C26814
998+
href: c26814.md
993999
- name: C/C++ warnings
9941000
items:
9951001
- name: Overview

docs/data-tools/connect-to-data-in-an-access-database-windows-forms.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
2-
title: Connect to data in an Access database (Windows Forms)
3-
ms.date: 02/12/2019
2+
title: Connect to data in an Access database
3+
ms.date: 07/18/2019
44
ms.topic: conceptual
55
helpviewer_keywords:
6-
- "databases, connecting to"
7-
- "databases, Access"
86
- "data [Visual Studio], connecting"
9-
- "connecting to data, from Access databases"
7+
- "connecting to data, Access databases"
108
- "Access databases, connecting"
119
ms.assetid: 4159e815-d430-4ad0-a234-e4125fcbef18
1210
author: gewarren
@@ -15,19 +13,19 @@ manager: jillfra
1513
ms.workload:
1614
- "data-storage"
1715
---
18-
# Connect to data in an Access database (Windows Forms)
16+
# Connect to data in an Access database
1917

20-
You can connect to an Access database (either an *.mdb* file or an *.accdb* file) by using Visual Studio. After you define the connection, the data appears in the **Data Sources** window. From there, you can drag tables or views onto your forms.
18+
You can connect to an Access database (either an *.mdb* file or an *.accdb* file) by using Visual Studio. After you define the connection, the data appears in the **Data Sources** window. From there, you can drag tables or views onto your design surface.
2119

2220
## Prerequisites
2321

24-
To use these procedures, you need a Windows Forms application project, and either an Access database (*.accdb* file) or an Access 2000-2003 database (*.mdb* file). Follow the procedure that corresponds to your file type.
22+
To use these procedures, you need a Windows Forms or WPF project and either an Access database (*.accdb* file) or an Access 2000-2003 database (*.mdb* file). Follow the procedure that corresponds to your file type.
2523

2624
## Create a dataset for an .accdb file
2725

28-
You can connect to databases created through Access 2013, Office 365, Access 2010, or Access 2007 by using the following procedure.
26+
Connect to databases created with Office 365, Access 2013, Access 2010, or Access 2007 by using the following procedure.
2927

30-
1. Open the Windows Forms application to which you want to connect data.
28+
1. Open a Windows Forms or WPF application project in Visual Studio.
3129

3230
2. To open the **Data Sources** window, on the **View** menu, select **Other Windows** > **Data Sources**.
3331

@@ -55,21 +53,21 @@ You can connect to databases created through Access 2013, Office 365, Access 201
5553

5654
10. Select **Next** on the **Choose your Data Connection** page.
5755

58-
You may get a dialog box telling you the data file is not in your current project. Select **Yes** or **No**.
56+
You may get a dialog box telling you the data file is not in your current project. Select **Yes** or **No**.
5957

6058
11. Select **Next** on the **Save connection string to the Application Configuration file** page.
6159

6260
12. Expand the **Tables** node on the **Choose your Database Objects** page.
6361

6462
13. Select the tables or views you want to include in your dataset, and then select **Finish**.
6563

66-
The dataset is added to your project, and the tables and views appear in the **Data Sources** window.
64+
The dataset is added to your project, and the tables and views appear in the **Data Sources** window.
6765

6866
## Create a dataset for an .mdb file
6967

70-
You create the dataset by running the **Data Source Configuration Wizard**.
68+
Connect to databases created with Access 2000-2003 by using the following procedure.
7169

72-
1. Open the Windows Forms application to which you want to connect data.
70+
1. Open a Windows Forms or WPF application project in Visual Studio.
7371

7472
2. On the **View** menu, select **Other Windows** > **Data Sources**.
7573

@@ -101,15 +99,11 @@ You create the dataset by running the **Data Source Configuration Wizard**.
10199

102100
The dataset is added to your project, and the tables and views appear in the **Data Sources** window.
103101

104-
## Security
105-
106-
Storing sensitive information (such as a password) can affect the security of your application. Using Windows Authentication (also known as integrated security) is a more secure way to control access to a database. For more information, see [Protecting connection information](/dotnet/framework/data/adonet/protecting-connection-information).
107-
108102
## Next steps
109103

110-
The dataset that you just created is now available in the **Data Sources** window. You can now perform any of the following tasks:
104+
The dataset that you just created is available in the **Data Sources** window. You can now perform any of the following tasks:
111105

112-
- Select items in the **Data Sources** window and drag them onto your form (see [Bind Windows Forms controls to data in Visual Studio](../data-tools/bind-windows-forms-controls-to-data-in-visual-studio.md)).
106+
- Select items in the **Data Sources** window and drag them onto your form or design surface (see [Bind Windows Forms controls to data in Visual Studio](../data-tools/bind-windows-forms-controls-to-data-in-visual-studio.md) or [WPF data binding overview](/dotnet/framework/wpf/data/data-binding-overview)).
113107

114108
- Open the data source in the **Dataset Designer** to add or edit the objects that make up the dataset.
115109

@@ -118,3 +112,5 @@ The dataset that you just created is now available in the **Data Sources** windo
118112
## See also
119113

120114
- [Add connections](../data-tools/add-new-connections.md)
115+
- [WPF data binding overview](/dotnet/framework/wpf/data/data-binding-overview)
116+
- [Windows Forms data binding](/dotnet/framework/winforms/data-binding-and-windows-forms)

0 commit comments

Comments
 (0)