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

  Allow the user to input the first and last base values

Write a C# program that produces a multiplication table. Allow the user to input the first and last base values for the multiplication table. Display a column in the table beginning with the first base inputted value

  Prepare a web application that will be used to keep track

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

  Different data types and their typical usage

In programming, you'll find that variables are fundamental building blocks in creating programs. Review the various data types used in C# and discuss and elaborate in detail as to the typical usage of those data types. Discuss a minimum of six dif..

  A program that could be used as a very basic police sketch

Write a C# program that could be used as a very basic police sketch program.

  Design a c# program to simulate playing the card game war

Design, implement, test, and debug a C# program to simulate playing the card game War. Utilizing the C# random number generator, deal 26 sets of 2 cards each.

  Program to find average of test scores input by user

Write down a C# program to find average of test scores input by user. Use pseudocode in which user inputs number of test scores and each test score.

  Write c# program that declares variable to represent length

Please complete the following Programming Exercises listed in your book. All programs must be done according to these Programming Principles (properly formatted and commented). (If you want to see an example of a simple program, please see this Sa..

  Add drop down lists for modifying the different style

add drop down lists for modifying the different style elements for the label element that displays the time.we will do

  Develop a windows application that will allow user to play

Develop a C# windows application that will allow a user to play an animal simulation game.

  Create a inventory management system in c applicationthis

create a inventory management system in c applicationthis is what the system must be able to

  List out the data types available in c sharp

List out the data types available in C# and their corresponding class/struct in .NET class library.

  Create an application that displays total no of customers

Joe also performs other nonroutine services and charges for parts and labor ($20 per hour). Create an application that displays the total for a customer's visit to Joe's.

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