Wrox Programmer Forums
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 8th, 2006, 03:45 AM
Authorized User
 
Join Date: Jan 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default table size

hi to everyone. do you know how to calculate the size of a file in c#? thanks :D

                         silvi

 
Old February 9th, 2006, 08:02 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nalla Send a message via Yahoo to nalla
Default


Hi silvi,
Try this example.

using System;
using System.IO;


    class Class1
    {

        static void Main(string[] args)
        {

                FileInfo fi = new FileInfo("C:\\_NavCClt.Log");
                Console.WriteLine("File size of gooli.jpg: {0}", fi.Length);

        }

}


nalaka hewage
 
Old February 10th, 2006, 04:12 AM
Authorized User
 
Join Date: Jan 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you! I will try it right now!







Similar Threads
Thread Thread Starter Forum Replies Last Post
Table Size Considerations hugh@kmcnetwork.com SQL Server 2000 0 April 24th, 2005 08:30 PM
Fixed size table amc Dreamweaver (all versions) 4 August 29th, 2004 07:03 AM
Size of database and table Jane SQL Server 2000 2 March 15th, 2004 03:57 AM
size of table (type table is table of number) MikoMax Oracle 1 November 19th, 2003 03:11 AM
Get table size Mitch SQL Server 2000 1 September 16th, 2003 11:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.