Archive

Posts Tagged ‘comments’

Posting source code on my blog

I had a request from a reader as to how they could post sample code in response to an article I had written. I thought this was an excellent question and it can be hard to find the right answer when all you want to do is post your question.

The following is a quick example of posting a code snippet for XAML which is actually XML. If you want to submit XAML in a post or comment then you must wrap it with the following tag:

XAML snippet

It will then look like this once rendered:

<TextBox Text="Hello World" />

There are many other language targets. I use these common ones:

• csharp
• vb
• sql
• xml

Refer to this link for other targets as well.

Hope that helps….

Categories: English Tags: , , , , , ,
Follow

Get every new post delivered to your Inbox.

Join 175 other followers