From the course: AI-Powered Development: GitHub Copilot in Visual Studio

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

PortChecker: The class library

PortChecker: The class library

- [Narrator] For this step, I manually added this project here, this PortLib class library to the solution. I figured it was quicker for me to do this myself, even though I know a Copilot Agent could handle it. Next, I asked Copilot to do the work. So here's my prompt. "I've added a PortLib class library to the project. "Can you implement the port code "that you put in the devutil project "in the PortLib instead "so I can make it reusable with other applications?" Notice I'm using natural language. I'm stating my goal, which is to move the code from one project to another. Very general instructions, and yet it worked. So, here you can see the changes that were made. It added three classes to the PortLib. That's the PortModels, the PortScanner, and the PortUtils. And then it made some changes to the DevUtil project and made some changes to the DevUtil Program.cs. You can see it removes some code, 58 removals and 22…

Contents