C# Lists and Files

Contents

keyboard_tab
C# Lists and Files
1
Introduction
PREVIEW1m 25s
2
Overview
PREVIEW54s
6
Summary
2m 49s

The course is part of this learning path

Introduction
Overview
Difficulty
Beginner
Duration
35m
Students
66
Ratings
5/5
starstarstarstarstar
Description

This course uses file reading and writing as a vehicle to illustrate important data validation concepts when mapping text data to objects and receiving user input. It demonstrates many of the essential elements present in business applications, that is: ingesting data from an external source, enabling users to modify that data, and saving the data back to permanent storage.

Robust and well-designed apps, especially concerning the user interface, need to validate input in terms of data format and applicability and provide feedback when entered data is not appropriate. We round off the course by implementing the data access layer design pattern that will enable the code to be easily adapted to other data sources.

Learning Objectives

  • Read planet data from a text file into a list of planet objects within a solar system object
  • Create a basic command-line user interface with data validation and feedback that writes updated planet data back to file
  • Take the file reading and writing functionality and split it out into a class that returns planet objects so you can easily change data sources in the future

Intended Audience

This course is ideal for anyone who already has some basic knowledge of C# and is looking to expand on that by learning about lists and files within the programming language.

Prerequisites

The ideal prerequisite for this course is our C# Loops Deep Dive course, but if you know what the .NET List class is and how to create one, then you’ll be able to follow along with these lectures and demonstrations.

 

Demo Source Code

https://github.com/cloudacademy/csharp-lists-and-files

Transcript

Hi and welcome to this C# course on Lists and Files. It's fair to say that for the vast majority of software, no matter its use case, reading data from an external source, doing something to it, and saving it, are very common operations. External sources can be files, databases, APIs, and web services. I wouldn't go so far as to say the data source is irrelevant, but in an object-oriented world, the paradigm is the same – convert the data into class-based objects, manipulate those objects, and then convert the objects' data back into the data sources' format. In this course, I'll introduce reading and writing to files, the oldest data source.

The ideal prerequisite for this course is the C# Loops Deep Dive course, but if you know what the .NET List class is and how to create one, then you’ll be able to appreciate these lectures and demonstrations. 

My name is Hallam Webber, and I’ll be leading you through this course. We welcome all feedback, so please feel free to contact us at support@cloudacademy.com with any comments, positive or negative. Let’s jump into lists and files.

About the Author
Avatar
Hallam Webber
Software Architect
Students
15611
Courses
30
Learning Paths
4

Hallam is a software architect with over 20 years experience across a wide range of industries. He began his software career as a  Delphi/Interbase disciple but changed his allegiance to Microsoft with its deep and broad ecosystem. While Hallam has designed and crafted custom software utilizing web, mobile and desktop technologies, good quality reliable data is the key to a successful solution. The challenge of quickly turning data into useful information for digestion by humans and machines has led Hallam to specialize in database design and process automation. Showing customers how leverage new technology to change and improve their business processes is one of the key drivers keeping Hallam coming back to the keyboard. 

Covered Topics