O'Reilly logo

MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET by MCSD Amit Kalani - MCAD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Apply Your Knowledge

Exercises

5.1. Using Simple Data Binding to Display Information from an Array

This exercise shows you how to populate an array in code and then use simple data binding to display the information on the user interface.

Estimated time: 20 minutes

1.
Create a new Visual C# .NET project to use for the exercises in this chapter.
2.
Add a new class file to your project. Name the class Computer.cs. Enter the following code in the class file to create a class that has three properties and a constructor:
 using System; namespace _316C05Exercises { public class Computer { private String computerName; private String cpu; private Int32 ram; public String ComputerName { get { return computerName; } set { computerName = value; } } public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required