Using mathematical operators

- An operator, in a programming language,…is a character or set of characters…that represent an operation of some kind.…There are mathematical operators, equality operators,…and a few other different types.…I'm going to focus here on math operators.…C-style languages share a common set of operators,…operators that show up in C, C#,…Java, JavaScript, and so on,…and then C# has some of its own operators as well.…

I'll start with the additive and multiplicative operators.…These operators are the common math operators…you see in just about every language.…The plus character for addition,…the hyphen or minus character for subtraction,…asterisk and forward slash for multiplying and dividing,…and the percent character, which is the remainder operator.…When you put a percent between two values,…you're dividing the values and returning what's left.…So, nine remainder two equals one.…

In addition to these, C# also supports the unary operators.…These are the increment and decrement operators,…plus plus and minus minus,…they add or subtract one to the current value,…

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.