Working with Boolean values and expressions

- A Boolean expression in C#…is an expression that returns true or false.…The words true and false are keywords in C#.…They're always spelled all lower case.…To represent a Boolean value as a variable,…you'll create an instance of the Boolean Structure.…It can be represented in your C# code…by the C# alias, bool, B-O-O-L, all lower case.…If you create a Boolean value by instantiating it…with the Boolean Structure's constructor method,…as seen here, the default value will be false,…and as I described previously in this course,…a Boolean value does not have an equivalent numeric value,…as it does in some other languages.…

In order to construct more complex Boolean expressions,…C# supports common equality operators.…The double equals operator compares two values,…and if they're equivalent, it returns true,…and if they're not equivalent, it returns false.…When you use these with numeric values,…integers, doubles, and so on,…you're comparing the values to each other,…but when you use the double equals operator with objects,…

Resume Transcript Auto-Scroll

Author

Released

12/18/2014

C# is an object-oriented language designed by Microsoft and used by systems engineers, desktop programmers, and mobile app developers the world over. In these tutorials, David Gassner takes you through C#'s history, its core syntax, and the fundamentals of writing strong C# code. After explaining C#'s relationship to .NET and Windows, David shows how to install Visual Studio, a great IDE for developing in C#, and then dives into the language itself. Along the way, he covers topics such as:

Declaring and initializing variables with a variety of data types

Exploring operators, expressions, constants, and enumerations

Controlling flow with conditional code and loops

Handling exceptions

Managing data collections

Creating custom classes

Organizing classes by namespace

Understanding inheritance

Whether you're choosing C# as your first step into programming or adding it your existing skillset, these training videos will help you understand the language and use it to build your own great software.