Not able get CheckOut files in SharePoint Object Model code.

Hi, I am writing a code to get some information related to files uploaded in SharePoint object model
That code getting information only for checked In files but those files which are in Checked Out mode and Checked Out by some other users id so those files information not coming.
Even when running code under “SPSecurity.RunWithElevatedPrivileges(delegate()”
But still not result for CheckOut files.
Below is the code sample to get file version size:
            SPSite oSite = new SPSite("http://sitecollection/");
            SPWeb oWeb = oSite.OpenWeb();
            SPList mylist = oWeb.Lists[libname];
            long fileVersion = 0;
            dt = new DataTable();
            DataRow dtr;
            DataColumn dtc;
            foreach (SPListItem item in mylist.Items)
                int iver = 0;
                fileVersion = fileVersion + item.File.Length;
                SPFileVersionCollection ver_coll = item.File.Versions;
                foreach (SPFileVersion item_ver in ver_coll)
                    iver += item_ver.Size;

                //listSize += item.File.Length;
                fileVersion += iver;
            fileVersion = fileVersion / 1024;
            Label2.Text = fileVersion.ToString();

Kindly guide me.
LVL 10
Minesh ShahSharePoint & all about itAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jamie McAllister MVPSharePoint ConsultantCommented:
You cannot see files that other people have checked out whether you elevate privileges or not. If there is a checked in version of a checked out file you can see that, but if it's not been checked in you'll need to use SPDocumentLibrary.CheckedOutFiles.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Minesh ShahSharePoint & all about itAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.