O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

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

Assignment

We’ve used assignment repeatedly already. It’s simply a way to assign a value to a variable (or property, indexer or event, to be precise). For example:

// Assigning to a local variable, declared elsewhere.person = new Person("Bart", 26);// Assigning to a property through a setter.person.DayOfBirth = new DateTime(1983, 2, 11);

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