Home > English > Posting source code on my blog

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….

Advertisements
Categories: English Tags: , , , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: