problem when accessing custom created column in User Information List in Sharepoint2007
I am trying to get the value of a field in User Information List programmatically. I am using the following code :
                                SPUser currUser = CurrentWeb.CurrentUser;
                                SPList userinfolist = CurrentWeb.Lists["User Information List"];
                                SPListItem userinfo = userinfolist.GetItemById(currUser.ID);
                                string published = userinfo["Published"].ToString();
here Published is the column i created in that list. i am getting an error as "Operation is not valid due to the current state of the object." But when i am trying to get the other fields like Name etc, there is no error. Please help me on this issue
problem when accessing custom created column in User Information List in Sharepoint2007
===

I am trying to get the value of a field in User Information List programmatically. I am using the following code :
                                SPUser currUser = CurrentWeb.CurrentUser;
                                SPList userinfolist = CurrentWeb.Lists["User Information List"];
                                SPListItem userinfo = userinfolist.GetItemById(currUser.ID);
                                string published = userinfo["Published"].ToString();
here Published is the column i created in that list. i am getting an error as "Operation is not valid due to the current state of the object." But when i am trying to get the other fields like Name etc, there is no error. Please help me on this issue