+1  A: 

That's because they're fields, not properties. Try:

    public void EnumerateConstants() {        
        FieldInfo[] thisObjectProperties = thisObject.GetFields();
        foreach (FieldInfo info in thisObjectProperties) {
            if (info.IsLiteral) {
                //Constant
            }
        }    
    }

Edit: DataDink's right, it's smoother to use IsLiteral

Walt W
uh yeah realized it too late... Yeah is anything const essentially static too?
deostroll
Walt W
deostroll
Um . . . something can be static but not constant.
Walt W
To elaborate, something that's constant and set at program initialization can never change for any independent object instance, so it might as well be static, given that no two instances will ever have different values of it. However, something that's static does not necessarily need to be constant (literal), as its value may change throughout the life of the program. Make sense?
Walt W
+1  A: 

FieldInfo objects actually have a ton of "IsSomething" booleans right on them:

        var m = new object();
        foreach (var f in m.GetType().GetFields())
            if (f.IsLiteral)
            {
                // stuff
            }

Which saves you a tiny ammount of code over checking the attributes anyways.

DataDink