Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
551 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | Visual C# (55 exercises) |
Topic ==> | Data structures (6 exercises) |
Level ==> | Average difficulty |
Subject ==> | C# training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
Right-click on your project, and choose to add the Film.cs class into it. Have a look at this class to see that it allows you to store the name and rating for one film at a time:
public class Film
{
// really simple class to hold details of your favourite films
public string FilmName { get; set; } = null;
public int Rating { get; set; } = 0;
}
Create a new form called frmFilms, and add a button and a datagridview to create this:
Call your controls btnShow and dgvFilms.
Add code to the button so that when you click on it you see a list of your favourite films:
Your list will be (very) different!
Your code should:
Create a new list of objects of type Film;
Create a few objects of type Film, adding each to this list;
Set the DataSource property of the datagridview to be this list.
When you've finished, close down any open windows.
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.