Copy Code As HTML

posted on 2004-10-14 at 23:37:18 by Joel Ross

I've been looking for a nice, easy, and clean way to copy code and paste it into my blog. That's why I don't post much code! Yeah, that's it. It's not because I'm lazy. No. Never.

Anyway, it's available here, and below is my first attempt to try it out. This is my Team class for the NFLPicks project.

     1: using System;
     2:  
     3: namespace Ross.NFLPicks.Data
     4: {
     5:     /// <summary>
     6:     /// Summary description for Teams.
     7:     /// </summary>
     8:     public class Team
     9:     {
    10:         private int _id = -1;
    11:         private string _name = string.Empty;
    12:  
    13:         public Team()
    14:         {
    15:         }
    16:  
    17:         public Team(int id){
    18:             this.Id = id;
    19:         }
    20:  
    21:         public Team(int id, string name){
    22:             this.Id = id;
    23:             this.Name = name;
    24:         }
    25:  
    26:         public int Id {
    27:             get { return _id; }
    28:             set { _id = value; }
    29:         }
    30:  
    31:         public string Name {
    32:             get { return _name; }
    33:             set { _name = value; }
    34:         }
    35:     }
    36: }

UPDATE: If you use b2evolution, paste the style into your custom stylesheet ahead of time, and then don't include the style in the copy. b2evo forbids style tags.

Categories: Blogging