Create a c-sharp console application

Assignment Help DOT NET Programming
Reference no: EM132107365

This program will use C# and LINQ to iterate files, to query, group and order data, and to create an XML document based on that data Implementation

You must follow these implementation guidelines:

1. Create a C# console application. This application has two command line arguments: A path to a folder and a name for a HTML report output file. The application collects all files with the same extension (converted to lower case) and determines for each extension, i.e. file type, the number of files and the total size of all files of this type

2. Implement a class with the following 4 static functions:

static IEnumerable EnumerateFilesRecursively(string path) Enumerate all files in a given folder recursively including the entire sub-folder hierarchy. You can use System.IO.Directory. Use the generator pattern (yield keyword) to implement the iterator.

static string FormatByteSize(long byteSize) Format a byte size in human readable form. Use the following units: B, kB, MB, GB, TB, PB, EB, and ZB where 1kB = 1000B. The numerical value should be greater or equal to 1, less than 1000 and formatted with 2 fixed digits after the decimal point, e.g. 1.30kB.

static XDocument CreateReport(IEnumerable files) Create a HTML document containing a table with three columns: "Type", "Count", and "Size" for the file name extension (converted to lower case), the number of files with this type, and the total size of all files with this type, respectively.

You can use System.IO.FileInfoto get the size of a file with a given path. Sort the table by the byte size value of the "Size" column in descending order.

Use your FormatByteSize function to format the value printed in the "Size" column. Implement this function using LINQ queries making use of group by and orderby. Use theSystem.Xml.Linq.XElement constructor to functionally construct the XML document.

public static void Main(string[] args) Take two command line arguments. The first value is the path of the input folder and the second the path of the HTML report output file. Call the functions above to create the report file.

Reference no: EM132107365

Questions Cloud

What is the projected audience : If the population of Localville is 550,000, what is the projected audience (i.e., the numerical reach)?
What is the probability that both the team a and team b : What is the probability that both the Team A and Team B will win this weekend? What is the probability that only one of the two teams will win this wee
Write an algorithm and program to compute e : Write an algorithm and program to compute e and compute the square root (v). The calculation of the important mathematical constant e and the square root.
Measures of central tendency : What is standard deviation and what does it have in common with measures of central tendency?
Create a c-sharp console application : Create a C# console application. This application has two command line arguments: A path to a folder and a name for a HTML report output file.
Probability that person has dental cavities : If one person is chosen at random, what is the probability that person has dental cavities?
Determine at least how many runners had a running : The standard deviation was 12 minutes. Using Chebysheff's theorem, determine at least how many runners had a running time between 53 minutes and 89 minutes?
What was the standard deviation : What was the standard deviation of these 2,403 runners?
Advertising campaign has an average frequency : If an advertising campaign has an average frequency of 6.6 to an audience of 11,000,000 persons, what is the number of total audience impressions?

Reviews

Write a Review

DOT NET Programming Questions & Answers

  Develop web services based application

Develop and test a Web services based application that meets the requirements applying SOA design principles.

  Design style elements in asp

Add drop down lists for modifying the different style elements for the label element that displays the time

  Create a shopping cart in asp

The users will use a browser to access the on-line store. The web server software for the production web server is Windows 2003 Server /IIS6.

  Inventory management system in c# application

Inventory management system in c# application

  Using .net resources to teach .net

This project will use the .NET framework to produce a set of materials to demonstrate the fundamental principles of .NET. Ideally it should demonstrate some of the principles of the framework e.g. interoperability.

  Prepare a marymount faculty site

Prepare a Marymount faculty site

  Blinky lights

Analysis proving that your code blinks the LEDs at the specified rates.

  Prepare a web application

Prepare a web application that will be used to keep track of patients registering in a hospital.

  Implementing the insurance management system

Implementing the Insurance Management System and implementation of Components as Web Services.

  Describe the characteristics of visual studio 2005

Describe the characteristics of Visual Studio 2005 Visual Studio.Net is a suite of products that includes 4 main languages. Name these languages and outline their use in industries

  What is a connectionstring

What is a ConnectionString. Give a suitable example to illustrate the various part of a ConnectionString

  Prepare a web application for internet service provider

Prepare a Web application and write the code also event planning document base. This web application allows the user to sign up for an Internet service provider for home connectivity.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd