KittenCode

January 14, 2011

How to add code to WordPress

Filed under: Uncategorized, WordPress — Ian @ 3:13 pm

All you need to know can be found :
here.

And here’s an example 🙂

using System.Runtime.Serialization;

namespace Weeeee
{
    [DataContract]
    public class Location
    {
        [DataMember(Name="Name")]
        private string _name;
        [DataMember(Name = "TimeZone")]
        private int _timeZone;

        public Location(string name, int timeZone) 
        {
            _name = name;
            _timeZone = timeZone;
        }

        public string Name
        {
            get { return _name; }
        }

        public int TimeZone
        {
            get { return _timeZone; }
        }
    }
}
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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

Blog at WordPress.com.

%d bloggers like this: