{"id":6279,"date":"2025-08-05T12:05:18","date_gmt":"2025-08-05T12:05:18","guid":{"rendered":"https:\/\/techhub.saworks.io\/docs\/tutoriel-github-intermediaire\/accelerez-le-developpement-dapplications-en-utilisant-github-copilot\/examinez-le-chat-en-ligne-les-actions-intelligentes-et-le-chat-rapide-de-github-copilot\/"},"modified":"2025-09-24T12:02:33","modified_gmt":"2025-09-24T12:02:33","slug":"examinez-le-chat-en-ligne-les-actions-intelligentes-et-le-chat-rapide-de-github-copilot","status":"publish","type":"docs","link":"https:\/\/techhub.saworks.io\/fr\/docs\/tutoriel-github-intermediaire\/accelerez-le-developpement-dapplications-en-utilisant-github-copilot\/examinez-le-chat-en-ligne-les-actions-intelligentes-et-le-chat-rapide-de-github-copilot\/","title":{"rendered":"Examinez le chat en ligne, les actions intelligentes et le chat rapide de GitHub Copilot"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>En plus de la vue Chat, GitHub Copilot Chat propose plusieurs autres moyens d\u2019interagir avec l\u2019assistant IA de programmation. Ces options incluent le&nbsp;<strong>chat en ligne<\/strong>, les&nbsp;<strong>actions intelligentes<\/strong>, et le&nbsp;<strong>chat rapide<\/strong>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Chat en ligne<\/strong><\/h3>\n\n\n\n<p>L\u2019une des fonctionnalit\u00e9s cl\u00e9s de GitHub Copilot Chat est la possibilit\u00e9 de r\u00e9pondre aux questions&nbsp;<strong>directement dans l\u2019\u00e9diteur<\/strong>, pendant que vous codez. Cela vous permet de b\u00e9n\u00e9ficier de l\u2019IA sans interrompre votre flux de travail.<\/p>\n\n\n\n<p>La fonctionnalit\u00e9 de chat en ligne est accessible&nbsp;<strong>uniquement lorsque vous avez un fichier ouvert<\/strong>&nbsp;dans l\u2019\u00e9diteur. Voici plusieurs fa\u00e7ons d\u2019ouvrir une session de chat en ligne :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>S\u00e9lectionner\u00a0<strong>Chat en ligne de l\u2019\u00e9diteur<\/strong>\u00a0dans le menu Copilot Chat.<\/li>\n\n\n\n<li>Utiliser le raccourci clavier\u00a0<strong>Ctrl+I<\/strong>.<\/li>\n\n\n\n<li>Faire un clic droit dans l\u2019\u00e9diteur de code, s\u00e9lectionner\u00a0<strong>Copilot<\/strong>\u00a0dans le menu contextuel, puis choisir\u00a0<strong>Chat en ligne de l\u2019\u00e9diteur<\/strong>.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/inline-chat-1.png\" alt=\"\" class=\"wp-image-6282 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 962px; --smush-placeholder-aspect-ratio: 962\/633;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Vous pouvez utiliser une session de&nbsp;<strong>chat en ligne<\/strong>&nbsp;pour poser des questions \u00e0 Copilot pendant que vous \u00e9crivez ou modifiez votre code.<\/p>\n\n\n\n<p>Lorsque vous ouvrez une session de chat en ligne, l\u2019interface suivante s\u2019affiche dans l\u2019\u00e9diteur.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/inline-chat-2.png\" alt=\"\" class=\"wp-image-6284 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 961px; --smush-placeholder-aspect-ratio: 961\/64;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Consid\u00e9rez le sc\u00e9nario suivant :<\/strong><\/h3>\n\n\n\n<p>Vous d\u00e9veloppez une application&nbsp;<strong>C#<\/strong>&nbsp;qui traite une liste de nombres. Les donn\u00e9es sont trait\u00e9es par&nbsp;<strong>lots de 100<\/strong>.<\/p>\n\n\n\n<p>Vous utilisez l\u2019extrait de code ci-dessous pour cr\u00e9er une&nbsp;<strong>liste de 100 entiers al\u00e9atoires<\/strong>&nbsp;compris entre&nbsp;<strong>1 et 1000<\/strong>, que vous pouvez utiliser pour vos tests.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2e2e2e;color:#d5ffff\">C#<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ create a list of 100 random number between 1 and 1000\nList&lt;int> numbers = new List&lt;int>();\nRandom random = new Random();\nfor (int i = 0; i &lt; 100; i++)\n{\n    numbers.Add(random.Next(1, 1000));\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #545454; font-style: italic\">\/\/ create a list of 100 random number between 1 and 1000<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">List<\/span><span style=\"color: #89DDFF\">&lt;int&gt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">numbers<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">new<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">List<\/span><span style=\"color: #89DDFF\">&lt;int&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Random<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">random<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">new<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">Random<\/span><span style=\"color: #89DDFF\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">for<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">(int<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">i<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">;<\/span><span style=\"color: #EEFFFF\"> i <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">100<\/span><span style=\"color: #89DDFF\">;<\/span><span style=\"color: #EEFFFF\"> i<\/span><span style=\"color: #89DDFF\">++)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Add<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">random<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Next<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">));<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Le code fonctionne correctement. Cependant, que faire si les exigences changent ? Et si vous devez vous assurer que la liste&nbsp;<strong>ne contient aucun doublon<\/strong>&nbsp;?<\/p>\n\n\n\n<p>Pour mettre \u00e0 jour votre code en utilisant les&nbsp;<strong>suggestions d\u2019autocompl\u00e9tion de GitHub Copilot<\/strong>, vous devriez :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Supprimer le code existant.<\/li>\n\n\n\n<li>R\u00e9diger un nouveau commentaire refl\u00e9tant votre exigence mise \u00e0 jour.<\/li>\n\n\n\n<li>Utiliser GitHub Copilot pour g\u00e9n\u00e9rer un nouvel extrait de code \u00e0 partir du commentaire.<\/li>\n\n\n\n<li>Examiner les suggestions et s\u00e9lectionner la meilleure option.<\/li>\n<\/ol>\n\n\n\n<p>Heureusement, ce n\u2019est pas n\u00e9cessaire. Une solution plus efficace consiste \u00e0 utiliser&nbsp;<strong>GitHub Copilot Chat<\/strong>&nbsp;pour proposer les modifications de code requises.<\/p>\n\n\n\n<p>Voici comment sugg\u00e9rer une mise \u00e0 jour de code via une session de&nbsp;<strong>chat en ligne<\/strong>&nbsp;:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>S\u00e9lectionnez<\/strong>\u00a0l\u2019extrait de code que vous souhaitez modifier.<\/li>\n\n\n\n<li><strong>Appuyez sur Ctrl + I<\/strong>\u00a0pour ouvrir le chat en ligne.<\/li>\n\n\n\n<li><strong>Demandez \u00e0 GitHub Copilot Chat<\/strong>\u00a0comment effectuer la mise \u00e0 jour.<\/li>\n\n\n\n<li><strong>Examinez les suggestions<\/strong>\u00a0et choisissez la meilleure option.<\/li>\n<\/ol>\n\n\n\n<p>Dans ce cas, vous pourriez demander :<br><strong>\u00ab Mets \u00e0 jour ce code pour que la liste ne contienne aucun doublon. \u00bb<\/strong><\/p>\n\n\n\n<p>Si vous \u00eates satisfait des modifications propos\u00e9es, vous pouvez cliquer sur&nbsp;<strong>Accepter<\/strong>&nbsp;et continuer \u00e0 coder.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/inline-chat-3.png\" alt=\"\" class=\"wp-image-6286 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 963px; --smush-placeholder-aspect-ratio: 963\/370;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Si vous n\u2019aimez pas les modifications propos\u00e9es, vous pouvez demander \u00e0 Copilot Chat de g\u00e9n\u00e9rer une autre suggestion en cliquant sur l\u2019<strong>ic\u00f4ne Relancer<\/strong>&nbsp;(<em>Rerun<\/em>), repr\u00e9sent\u00e9e par une&nbsp;<strong>fl\u00e8che circulaire<\/strong>&nbsp;situ\u00e9e sous le champ de saisie.<\/p>\n\n\n\n<p>Si, apr\u00e8s avoir relanc\u00e9 la requ\u00eate, vous n\u2019obtenez toujours pas le r\u00e9sultat souhait\u00e9, essayez d\u2019<strong>ajouter du contexte<\/strong>&nbsp;\u00e0 votre requ\u00eate. Copilot Chat fournit de meilleures suggestions lorsque la requ\u00eate est&nbsp;<strong>claire, concise et pr\u00e9cise<\/strong>. Vous pouvez \u00e9galement choisir&nbsp;<strong>Ignorer<\/strong>&nbsp;(<em>Discard<\/em>) pour fermer le chat en ligne sans appliquer de modifications.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Actions intelligentes<\/strong><\/h3>\n\n\n\n<p>Certaines t\u00e2ches sont si courantes qu\u2019elles peuvent \u00eatre automatis\u00e9es. GitHub Copilot Chat propose des&nbsp;<strong>actions intelligentes<\/strong>&nbsp;qui permettent d\u2019ex\u00e9cuter certaines t\u00e2ches sans r\u00e9diger de requ\u00eate. Ce sont des actions pr\u00e9d\u00e9finies que vous pouvez lancer directement depuis l\u2019\u00e9diteur Visual Studio Code pour accomplir rapidement des t\u00e2ches courantes.<\/p>\n\n\n\n<p>Voici les actions intelligentes disponibles :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Explain (Expliquer)<\/strong>\u00a0: G\u00e9n\u00e8re une description en langage naturel du code s\u00e9lectionn\u00e9. Utile pour comprendre le but et le fonctionnement d\u2019un extrait de code, notamment si vous travaillez sur du code inconnu ou devez l\u2019expliquer \u00e0 d\u2019autres.<\/li>\n\n\n\n<li><strong>Fix (Corriger)<\/strong>\u00a0: Propose une correction pour le code s\u00e9lectionn\u00e9. Pratique en cas d\u2019erreur ou de probl\u00e8me dans le code, Copilot peut sugg\u00e9rer des modifications de variables, structures de contr\u00f4le ou appels de fonctions.<\/li>\n\n\n\n<li><strong>Review and Comment (Revoir et commenter)<\/strong>\u00a0: Fournit une revue de code du segment s\u00e9lectionn\u00e9. Utile pour identifier des probl\u00e8mes potentiels, am\u00e9liorer la qualit\u00e9 du code et garantir le respect des bonnes pratiques. Cette action peut aider \u00e0 rep\u00e9rer des bugs, des probl\u00e8mes de performance ou des failles de s\u00e9curit\u00e9.<\/li>\n\n\n\n<li><strong>Generate Docs (G\u00e9n\u00e9rer la documentation)<\/strong>\u00a0: Cr\u00e9e une documentation pour le code s\u00e9lectionn\u00e9. Id\u00e9al pour documenter votre base de code, surtout dans les projets collaboratifs ou \u00e0 partager.<\/li>\n\n\n\n<li><strong>Generate Tests (G\u00e9n\u00e9rer des tests)<\/strong>\u00a0: Cr\u00e9e des tests unitaires pour le code s\u00e9lectionn\u00e9. Utile pour v\u00e9rifier la fiabilit\u00e9 et la justesse du code, notamment dans les projets complexes ou critiques.<\/li>\n<\/ul>\n\n\n\n<p>Pour acc\u00e9der aux actions intelligentes,&nbsp;<strong>faites un clic droit<\/strong>&nbsp;sur un extrait de code dans l\u2019\u00e9diteur et s\u00e9lectionnez l\u2019action souhait\u00e9e dans le&nbsp;<strong>menu contextuel Copilot<\/strong>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/smart-actions-1.png\" alt=\"\" class=\"wp-image-6288 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 826px; --smush-placeholder-aspect-ratio: 826\/717;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Reprenons l\u2019exemple de l\u2019application sur les&nbsp;<strong>nombres premiers<\/strong>.<\/p>\n\n\n\n<p>Dans la section pr\u00e9c\u00e9dente, le&nbsp;<strong>chat en ligne<\/strong>&nbsp;a propos\u00e9 le code suivant pour garantir que la liste&nbsp;<strong>ne contient aucun doublon<\/strong>&nbsp;:<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(2 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2e2e2e;color:#d5ffff\">C#<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ create a list of 100 random numbers between 1 and 1000\nList&lt;int> numbers = new List&lt;int>();\nRandom random = new Random();\nwhile (numbers.Count &lt; 100)\n{\n    int randomNumber = random.Next(1, 1000);\n    if (!numbers.Contains(randomNumber))\n    {\n        numbers.Add(randomNumber);\n    }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #545454; font-style: italic\">\/\/ create a list of 100 random numbers between 1 and 1000<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">List<\/span><span style=\"color: #89DDFF\">&lt;int&gt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">numbers<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">new<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">List<\/span><span style=\"color: #89DDFF\">&lt;int&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Random<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">random<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">new<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">Random<\/span><span style=\"color: #89DDFF\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">while<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #EEFFFF\">Count <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">100<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">int<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">randomNumber<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> random<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Next<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF; font-style: italic\">if<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">(!<\/span><span style=\"color: #EEFFFF\">numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Contains<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">randomNumber<\/span><span style=\"color: #89DDFF\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Add<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">randomNumber<\/span><span style=\"color: #89DDFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Bien que ce code garantisse une collection d\u2019\u00e9l\u00e9ments uniques, il peut \u00eatre&nbsp;<strong>am\u00e9lior\u00e9<\/strong>.<\/p>\n\n\n\n<p>Vous pouvez utiliser l\u2019action intelligente&nbsp;<strong>Review This<\/strong>&nbsp;pour v\u00e9rifier un extrait de code. Pour cela :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>S\u00e9lectionnez<\/strong>\u00a0le code \u00e0 examiner \u2014 dans ce cas, le code qui g\u00e9n\u00e8re la liste de nombres al\u00e9atoires.<\/li>\n\n\n\n<li><strong>Choisissez \u00ab\u00a0Review This\u00a0\u00bb<\/strong>\u00a0dans le menu contextuel Copilot.<\/li>\n\n\n\n<li><strong>Examinez les suggestions<\/strong>\u00a0et cliquez sur\u00a0<strong>Accepter<\/strong>\u00a0pour appliquer les modifications.<\/li>\n<\/ol>\n\n\n\n<p>Pour l\u2019extrait de code qui g\u00e9n\u00e8re les nombres al\u00e9atoires, l\u2019action&nbsp;<strong>Review This<\/strong>&nbsp;propose les am\u00e9liorations suivantes :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Initialiser\u00a0<code>List&lt;int> numbers<\/code>\u00a0avec une capacit\u00e9 de 100<\/strong>\u00a0pour \u00e9viter les redimensionnements multiples lors du remplissage.<\/li>\n\n\n\n<li><strong>Utiliser\u00a0<code>HashSet&lt;int><\/code>\u00a0au lieu de\u00a0<code>List&lt;int><\/code><\/strong>\u00a0pour des recherches plus rapides lors de la v\u00e9rification des doublons.<\/li>\n<\/ul>\n\n\n\n<p>Dans ce cas, l\u2019action intelligente&nbsp;<strong>Review This<\/strong>&nbsp;vous oriente vers l\u2019utilisation de&nbsp;<strong><code>HashSet&lt;int&gt;<\/code><\/strong>&nbsp;plut\u00f4t que&nbsp;<strong><code>List&lt;int&gt;<\/code><\/strong>, afin d\u2019<strong>am\u00e9liorer les performances<\/strong>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(2 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2e2e2e;color:#d5ffff\">C#<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ create a list of 100 random numbers between 1 and 1000\nHashSet&lt;int> numbers = new HashSet&lt;int>();\nRandom random = new Random();\nwhile (numbers.Count &lt; 100)\n{\n    int randomNumber = random.Next(1, 1000);\n    if (!numbers.Contains(randomNumber))\n    {\n        numbers.Add(randomNumber);\n    }\n}\n\nint sum = addPrimeNumbersInNumericList(numbers);\nConsole.WriteLine(sum);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #545454; font-style: italic\">\/\/ create a list of 100 random numbers between 1 and 1000<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">HashSet<\/span><span style=\"color: #89DDFF\">&lt;int&gt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">numbers<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">new<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">HashSet<\/span><span style=\"color: #89DDFF\">&lt;int&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Random<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">random<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">new<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">Random<\/span><span style=\"color: #89DDFF\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">while<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #EEFFFF\">Count <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">100<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">int<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">randomNumber<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> random<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Next<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF; font-style: italic\">if<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">(!<\/span><span style=\"color: #EEFFFF\">numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Contains<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">randomNumber<\/span><span style=\"color: #89DDFF\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Add<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">randomNumber<\/span><span style=\"color: #89DDFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">int<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">sum<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">addPrimeNumbersInNumericList<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">numbers<\/span><span style=\"color: #89DDFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">Console<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">WriteLine<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">sum<\/span><span style=\"color: #89DDFF\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Bien que l\u2019utilisation d\u2019un&nbsp;<strong><code>HashSet<\/code><\/strong>&nbsp;soit efficace pour garantir une collection d\u2019\u00e9l\u00e9ments uniques, cette mise \u00e0 jour introduit un&nbsp;<strong>nouveau probl\u00e8me<\/strong>.<\/p>\n\n\n\n<p>La m\u00e9thode&nbsp;<code>addPrimeNumbersInNumericList<\/code>&nbsp;attend une&nbsp;<strong><code>List&lt;int&gt;<\/code><\/strong>&nbsp;en entr\u00e9e, mais le code mis \u00e0 jour cr\u00e9e un&nbsp;<strong><code>HashSet&lt;int&gt;<\/code><\/strong>. Cela entra\u00eene l\u2019erreur de compilation suivante :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/smart-actions-2.png\" alt=\"\" class=\"wp-image-6290 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 644px; --smush-placeholder-aspect-ratio: 644\/221;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Heureusement, vous pouvez utiliser l\u2019action intelligente&nbsp;<strong>Fix<\/strong>&nbsp;pour corriger l\u2019erreur. Pour cela :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Faites un clic droit<\/strong>\u00a0sur l\u2019extrait de code \u00e0 corriger \u2014 dans ce cas, le code soulign\u00e9 en rouge.<\/li>\n\n\n\n<li>S\u00e9lectionnez\u00a0<strong>Fix<\/strong>\u00a0dans le menu contextuel Copilot.<\/li>\n\n\n\n<li><strong>Examinez la correction propos\u00e9e<\/strong>\u00a0et cliquez sur\u00a0<strong>Accepter<\/strong>\u00a0pour appliquer les modifications.<\/li>\n<\/ol>\n\n\n\n<p>L\u2019action&nbsp;<strong>Fix<\/strong>&nbsp;g\u00e9n\u00e8re une ou plusieurs suggestions pour corriger une erreur. Dans ce cas, l\u2019une des suggestions utilise la m\u00e9thode&nbsp;<strong><code>ToList()<\/code><\/strong>&nbsp;pour convertir le&nbsp;<code>HashSet&lt;int&gt;<\/code>&nbsp;en&nbsp;<code>List&lt;int&gt;<\/code>&nbsp;lors de l\u2019appel \u00e0 la m\u00e9thode&nbsp;<code>addPrimeNumbersInNumericList<\/code>.<\/p>\n\n\n\n<p>Le code r\u00e9sultant ressemblera \u00e0 l\u2019extrait suivant :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#EEFFFF;--cbp-line-number-width:calc(2 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2e2e2e;color:#d5ffff\">C#<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ create a list of 100 random numbers between 1 and 1000\nHashSet&lt;int> numbers = new HashSet&lt;int>();\nRandom random = new Random();\nwhile (numbers.Count &lt; 100)\n{\n    int randomNumber = random.Next(1, 1000);\n    if (!numbers.Contains(randomNumber))\n    {\n        numbers.Add(randomNumber);\n    }\n}\n\nint sum = addPrimeNumbersInNumericList(numbers.ToList());\nConsole.WriteLine(sum);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #545454; font-style: italic\">\/\/ create a list of 100 random numbers between 1 and 1000<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">HashSet<\/span><span style=\"color: #89DDFF\">&lt;int&gt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">numbers<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">new<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">HashSet<\/span><span style=\"color: #89DDFF\">&lt;int&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Random<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">random<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">new<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">Random<\/span><span style=\"color: #89DDFF\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">while<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #EEFFFF\">Count <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">100<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">int<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">randomNumber<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> random<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Next<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF; font-style: italic\">if<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">(!<\/span><span style=\"color: #EEFFFF\">numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Contains<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">randomNumber<\/span><span style=\"color: #89DDFF\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">Add<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">randomNumber<\/span><span style=\"color: #89DDFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">int<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #FFCB6B\">sum<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">addPrimeNumbersInNumericList<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">numbers<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">ToList<\/span><span style=\"color: #89DDFF\">());<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">Console<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">WriteLine<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF\">sum<\/span><span style=\"color: #89DDFF\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Comme toujours,&nbsp;<strong>examinez attentivement<\/strong>&nbsp;la suggestion fournie par Copilot Chat. Il peut exister de meilleures solutions. Vous pouvez cliquer sur&nbsp;<strong>Accepter<\/strong>&nbsp;pour mettre \u00e0 jour votre code avec la correction propos\u00e9e.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Chat rapide<\/strong><\/h3>\n\n\n\n<p>La troisi\u00e8me option d\u2019interaction propos\u00e9e par GitHub Copilot Chat est le&nbsp;<strong>Chat rapide<\/strong>&nbsp;(<em>Quick Chat<\/em>).<\/p>\n\n\n\n<p>Vous pouvez utiliser cette fonctionnalit\u00e9 lorsque vous souhaitez avoir une&nbsp;<strong>conversation rapide et interactive<\/strong>&nbsp;avec l\u2019IA. Cela peut \u00eatre utile pour r\u00e9soudre un probl\u00e8me, comprendre un morceau de code ou g\u00e9n\u00e9rer des id\u00e9es. Le Chat rapide est con\u00e7u pour ressembler \u00e0 une discussion avec un autre d\u00e9veloppeur, ce qui en fait un excellent outil pour la&nbsp;<strong>r\u00e9solution collaborative de probl\u00e8mes<\/strong>.<\/p>\n\n\n\n<p>Pour ouvrir une fen\u00eatre de Chat rapide, vous pouvez :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Appuyer sur\u00a0<strong>Ctrl+Shift+Alt+L<\/strong>\u00a0dans l\u2019\u00e9diteur Visual Studio Code,<\/li>\n\n\n\n<li>Ou ouvrir\u00a0<strong>Quick Chat<\/strong>\u00a0depuis le\u00a0<strong>menu Copilot Chat<\/strong>.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/quick-chat-1.png\" alt=\"\" class=\"wp-image-6292 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 544px; --smush-placeholder-aspect-ratio: 544\/382;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group has-background is-layout-constrained wp-block-group-is-layout-constrained\" style=\"border-width:1px;border-radius:15px;background-color:#ff5e8782\">\n<h3 class=\"wp-block-heading\"><strong>R\u00e9sum\u00e9<\/strong><\/h3>\n\n\n\n<p>GitHub Copilot Chat propose plusieurs fa\u00e7ons d\u2019interagir avec l\u2019assistant IA de programmation, notamment le\u00a0<strong>chat en ligne<\/strong>, les\u00a0<strong>actions intelligentes<\/strong>, et le\u00a0<strong>chat rapide<\/strong>\u00a0(<em>Quick Chat<\/em>).<br>Ces fonctionnalit\u00e9s vous permettent de\u00a0<strong>poser des questions<\/strong>,\u00a0<strong>obtenir des suggestions de code<\/strong>, et\u00a0<strong>r\u00e9aliser rapidement des t\u00e2ches courantes de programmation<\/strong>.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>En plus de la vue Chat, GitHub Copilot Chat propose plusieurs autres moyens d\u2019interagir avec l\u2019assistant IA de programmation. Ces options incluent le&nbsp;chat [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":6130,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"doc_badge":[],"class_list":["post-6279","docs","type-docs","status-publish","hentry"],"author_avatar":"https:\/\/secure.gravatar.com\/avatar\/6a70e7c73db9f245e650948d09d74f61?s=96&d=mm&r=g","author_name":"Annick N'dri","_links":{"self":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/6279"}],"collection":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/comments?post=6279"}],"version-history":[{"count":0,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/6279\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/6130"}],"wp:attachment":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/media?parent=6279"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/doc_tag?post=6279"},{"taxonomy":"doc_badge","embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/doc_badge?post=6279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}