Exchange Server and Outlook 2007 RSS Feeds

Every other day, my mailbox at work was reaching its size limit despite moving big items to a personal PST file. I couldn't figure out why it kept filling up so fast. By analyzing folder sizes, I discovered that RSS Feeds in Outlook 2007 count toward your Exchange size limit, and one of my RSS feeds was taking up a lot of space. After I moved the old RSS feeds from the feed in question to the personal PST file, the problem went away.

Implicit and Explicit Operators in C#

For a side project I'm working on, explicit operators have come in handy in the data layer. With explicit operators, you can convert from one class to another using a user-defined conversion operator. For example:

    public class MyClass

    {

        private int _id;

        private string _description;

 

        public int ID

        {

            get { return _id; }

            set { _id = value; }

        }

 

        public string Description

        {

            get { return _description; }

            set { _description = value; }

        }

 

        public static MyClass GetMyClass(int id)

        {

            return (MyClass)AnotherClass.GetRows(id);

        }

 

        public static explicit operator MyClass(DataTable dataTable)

        {

            MyClass myClass = new MyClass();

            myClass.ID = Convert.ToInt32(dataTable.Rows[0]["ID"]);

            myClass.Description = Convert.ToString(dataTable.Rows[0]["Description"]);

            return myClass;

        }

    }

 

    public class AnotherClass

    {

        public static DataTable GetRows(int id)

        {

            DataTable dataTable = new DataTable();

            //…

            return dataTable;

        }

    }

With implicit operators, you can implicitly convert from one class to a user-defined operator without casting. For example:

    public class MyClass

    {

        private int _value;

 

        public int Value

        {

            get { return _value; }

            set { _value = value; }

        }

 

        public MyClass()

        {

        }

 

        public MyClass(int value)

        {

            _value = value;

        }

 

        public static void SomeMethod()

        {

            MyClass myClass = new MyClass(2);

            int id = myClass;

        }

 

        public static implicit operator int(MyClass myClass)

        {

            return myClass.Value;

        }

    }

Pretty cool, huh?

Twitter

I've been using Twitter for a couple of months and I'm http://twitter.com/rolshan. For those that don't know what Twitter is, I basically consider it a legal way of stalking what your friends and other people are doing. :) I recently started contributing to an open source Windows Twitter client called TeleTwitter. Twitter is an interesting concept and I sometimes find myself using Twitter more frequently than IM. See you in Twitter land.