-
In the area where you type messages, selectÂ
 Show Formatting options. -
SelectÂ
 Code block from the task bar. -
Select the
 down arrow above the code area and choose a specific language, like C#, HTML, or Java. -
Enter your code for the snippet, and then select
 Send.
Tip: When you choose a language, Teams applies color syntax highlighting to your code snippet.