Saturday, September 18, 2010

How to copy color syntax from VS2010 to Blogger

Update: I just noticed that this is working in Chrome (which is what I usually use), but on in Internet Explorer 8

Step 1: Install Productivity Power Tools (which include HTML copy)
Step 2: Highlight some code and copy to the clipboard with [Ctrl][c]
Step 3: In Blogger, paste with [Ctrl][v]

If pasting HTML, you'll need to encode your less than signs. (Change < to &lt;)

               switch (pricedisplaytype)
{
case (int)ProductPriceDisplayType.DontShowPrice:
item.ItemTitle = description;
break;
case (int)ProductPriceDisplayType.ShowPriceEach:
item.ItemTitle = String.Format("{0} (${1:n3} each)", description, qty.Price / qty.Quantity);
break;
case (int)ProductPriceDisplayType.ShowTotalPrice:
item.ItemTitle = String.Format("{0} (${1:n2})", description, qty.Price);
break;
}

No comments:

Post a Comment