You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-tools/walkthrough-creating-a-simple-wcf-service-in-windows-forms.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ This walkthrough demonstrates how to create a Windows Communication Foundation (
30
30
31
31
[Visual Studio](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-cta) with the **Windows Communication Foundation** component installed. To install it:
32
32
33
-
1. Open **Visual Studio Installer** or select **Tools** > **Get Tools and Features** from the menu.
33
+
1. Open the **Visual Studio Installer**app, or select **Tools** > **Get Tools and Features** from the Visual Studio menu.
34
34
1. In **Visual Studio Installer**, choose **Modify** next to the version of Visual Studio you want to modify.
35
35
1. Select the **Individual components** tab, and then choose **Windows Communication Foundation** under **Development activities**.
36
36
1. Select **Modify**.
@@ -70,7 +70,9 @@ To create a WCF service in Visual Studio, follow these steps:
70
70
71
71
---
72
72
73
-
6. Change the type for the `value` parameter to string, as follows:
73
+
6. Change the type for the `value` parameter to string.
74
+
75
+
In this code example, note the `OperationContract` attribute. This attribute is required for any method exposed by the service.
74
76
75
77
### [C#](#tab/csharp)
76
78
@@ -80,8 +82,6 @@ To create a WCF service in Visual Studio, follow these steps:
In this code example, note the `OperationContract` attribute. This attribute is required for any method exposed by the service.
84
-
85
85
---
86
86
87
87
7. In Solution Explorer, double-click **Service1.cs** or **Service1.vb**.
@@ -140,7 +140,7 @@ To test the WCF service you created, follow these steps:
140
140
141
141
## Access the WCF service
142
142
143
-
Now that you created and tested the WCF service, you can reference it from a project and use it to build a client application.
143
+
After you create and test the WCF service, you can reference it from a project and use it to build a client application.
144
144
145
145
### Reference the WCF service
146
146
@@ -164,11 +164,13 @@ To reference the WCF service from a project, follow these steps:
164
164
165
165
### Build a client application
166
166
167
-
1. In Solution Explorer, depending on which type of project you created, double-click **Form1.cs**, or **Form1.vb**, in the Windows Forms app.
167
+
To use a WCF service reference to build a client application, follow these steps.
168
+
169
+
1. In Solution Explorer, double-click **Form1.cs** or **Form1.vb** in the Windows Forms app.
168
170
169
171
The form opens in Windows Forms Designer.
170
172
171
-
1. Open the **Toolbox** by selecting **View** > **Toolbox** from the menu, or press **Ctrl**+**Alt**+**X**on the keyboard.
173
+
1. Open the **Toolbox** by selecting **View** > **Toolbox** from the menu, or press **Ctrl**+**Alt**+**X**from the keyboard.
172
174
173
175
1. From the **Toolbox**, drag a **TextBox** control, a **Label** control, and a **Button** control onto the form.
174
176
@@ -188,7 +190,7 @@ To reference the WCF service from a project, follow these steps:
188
190
189
191
1. In Solution Explorer, right-click the project node (for example, **WindowsFormsApp1**), and select **Set as StartUp Project**.
190
192
191
-
1. Press **F5** to run the project. Enter some text and select the button. The label displays **You entered:** followed by the text that you entered.
193
+
1. Press **F5** to run the project. Enter some text and select the button. The label displays **You entered:**, followed by your text.
192
194
193
195
:::image type="content" alt-text="Screenshot that shows the result displayed in the running client application form." source="../data-tools/media/vs-2022/windows-forms-app.png":::
0 commit comments