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: Using-GitHub-Copilot-with-CSharp/README.md
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,30 +112,43 @@ https://< your url>.app.github.dev/weatherforecast
112
112
<imgsrc="./images/005ports.jpg"alt="port view in the editor"width="500"height="300">
113
113
</div>
114
114
115
-
3. In this next step we want to refactor some code and generate a new record for our Weather API. The goal is to add a new record that includes the name of the city. From the file pane, navigate to the following path `SampleApp\BackEnd\Program.cs` and open `Program.cs`. Navigate to the end of the file and type in (or copy):
115
+
3. In this next step we want to refactor some code and generate a new record for our Weather API. The goal is to add a new record that includes the name of the city. We are going to achieve this by asking Copilot directly from the file using code comments. From the file pane, navigate to the following path `SampleApp\BackEnd\Program.cs` and open `Program.cs`. Navigate to the end of the file and type in (or copy):
116
116
117
117
```csharp
118
118
// create a new internal record named WeatherForecastByCity that request the following parameters: City, Date, TemperatureC, Summary
119
119
```
120
120
121
-
TODO: show output
121
+
The output should be similar to this:
122
122
123
-
4. We can create a new C# class by creating a new file under the 'BackEnd' folder: '/BackEnd/customer.cs'. Press `CTRL + I` to open the inline chat and type in:
123
+
<divalign="left">
124
+
<imgsrc="./images/006internalrecord.jpg"alt="changes to existing record"width="500"height="300">
125
+
</div>
126
+
127
+
4. Now we want to use the inline feature of Copilot. Using the inline feature we can focus on the code in front of us and make progressive changes as needed in our code base. Next, we will create a new C# class by creating a new file under the `Backend` folder: `SampleApp\BackEnd\Customer.cs`.
**Note:** Inthecasethatyoudonotsee [NextEditSuggestions](https://code.visualstudio.com/blogs/2025/02/12/next-edit-suggestions) appear in your editor, check that they are enabled in your editor.
0 commit comments